本文整理汇总了Python中pageobjects.base.PageObject.wait_until_exists方法的典型用法代码示例。如果您正苦于以下问题:Python PageObject.wait_until_exists方法的具体用法?Python PageObject.wait_until_exists怎么用?Python PageObject.wait_until_exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pageobjects.base.PageObject
的用法示例。
在下文中一共展示了PageObject.wait_until_exists方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reset_redeploy
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_reset_redeploy(self):
"""Reset environment after deploy changes
Scenario:
1. Add controller and compute nodes
2. Click deploy
3. Add new compute node and deploy changes
4. Reset environment
4. Verify that environment is reseted
"""
Tabs().nodes.click()
Nodes().add_controller_compute_nodes()
Nodes().deploy_changes.click()
DeployChangesPopup().deploy.click()
TaskResultAlert().close.click()
Nodes().add_nodes.click()
Nodes().nodes_discovered[0].checkbox.click()
RolesPanel().compute.click()
Nodes().apply_changes.click()
PageObject.wait_until_exists(Nodes().apply_changes)
Nodes().deploy_changes.click()
DeployChangesPopup().deploy.click()
TaskResultAlert().close.click()
Tabs().actions.click()
Actions().reset_env()
Tabs().nodes.click()
for node in Nodes().nodes:
self.assertEqual("pending addition", node.status.text.lower(), "Node status is Pending Addition")
self.assertTrue(Nodes().deploy_changes.is_enabled())
示例2: test_rhsm
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_rhsm(self):
"""Download RHEL and RHOS by RHSM
Scenario:
1. Enter environment name
2. Select RHOS in release list
3. Enter Redhat username and password
4. Click next till the end and click create
5. Open releases tab
6. Verify that RHOS status is active
"""
with Wizard() as w:
w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
w.license_rhsm.click()
w.redhat_username.send_keys(REDHAT_USERNAME)
w.redhat_password.send_keys(REDHAT_PASSWORD)
for i in range(6):
w.next.click()
w.create.click()
w.wait_until_exists()
Header().releases.click()
with Releases() as r:
PageObject.wait_until_exists(
r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
self.assertEqual(
'Active', r.dict[OPENSTACK_REDHAT].status.text,
'RHOS status is active')
示例3: test_rhn_satellite
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_rhn_satellite(self):
"""Download RHEL and RHOS by RHN satellite
Scenario:
1. Enter environment name
2. Select RHOS in release list
3. Select RHN option
4. Enter Redhat username and password, satellite
hostname and activation key
5. Click next till the end and click create
6. Open releases tab
7. Verify that RHOS status is active
"""
with Wizard() as w:
w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
w.license_rhn.click()
w.redhat_username.send_keys(REDHAT_USERNAME)
w.redhat_password.send_keys(REDHAT_PASSWORD)
w.redhat_satellite.send_keys(REDHAT_SATELLITE)
w.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
for i in range(6):
w.next.click()
w.create.click()
w.wait_until_exists()
Header().releases.click()
with Releases() as r:
PageObject.wait_until_exists(
r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
self.assertEqual(
'Active', r.dict[OPENSTACK_REDHAT].status.text,
'RHOS status is active')
示例4: test_rhn_satellite
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_rhn_satellite(self):
"""Download RHEL with RHN option
Scenario:
1. Open releases tab
2. Click Configure button in actions column
3. Select 'RHN' radiobutton
4. Enter username and password
5. Enter satellite hostname, activation key and click apply
6. Check that RHOS status is active
"""
Releases().rhel_setup.click()
with RedhatAccountPopup() as p:
p.license_rhn.click()
p.redhat_username.send_keys(REDHAT_USERNAME)
p.redhat_password.send_keys(REDHAT_PASSWORD)
p.redhat_satellite.send_keys(REDHAT_SATELLITE)
p.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
p.apply.click()
p.wait_until_exists()
with Releases() as r:
PageObject.wait_until_exists(
r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
self.assertEqual(
'Active', r.dict[OPENSTACK_REDHAT].status.text,
'RHOS status is active')
示例5: test_cancel_button
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_cancel_button(self):
"""Cancel environment wizard
Scenario:
1. Enter environment name
2. Select Havana on Ubuntu in release list and click next
3. Select HA mode and click next
4. Select KVM hypervisor and click next
5. Select Neutron with GRE and click next
6. Select Ceph options for Cinder and Glance and click next
7. Select install Sahara, Murano and click next
8. Click cancel button
9. Click create environment again and check that
all default values are selected
"""
with Wizard() as w:
w.name.send_keys(OPENSTACK_RELEASE_UBUNTU)
w.release.select_by_visible_text(OPENSTACK_RELEASE_UBUNTU)
w.next.click()
w.mode_ha_compact.click()
w.next.click()
w.hypervisor_kvm.click()
w.next.click()
w.network_neutron_gre.click()
w.next.click()
w.storage_cinder_ceph.click()
w.storage_glance_ceph.click()
w.next.click()
w.install_sahara.click()
w.install_murano.click()
w.next.click()
w.cancel.click()
PageObject.wait_until_exists(w.parent)
Environments().create_cluster_box.click()
with Wizard() as w:
self.assertEqual(w.name.get_attribute('value'), '')
self.assertEqual(w.release.first_selected_option.text,
OPENSTACK_RELEASE_CENTOS)
w.name.send_keys(OPENSTACK_RELEASE_UBUNTU)
w.next.click()
self.assertTrue(w.mode_ha_compact.
find_element_by_tag_name('input').is_selected())
w.next.click()
self.assertTrue(w.hypervisor_qemu.
find_element_by_tag_name('input').is_selected())
w.next.click()
self.assertTrue(w.network_nova.
find_element_by_tag_name('input').is_selected())
w.next.click()
self.assertTrue(w.storage_cinder_default.
find_element_by_tag_name('input').is_selected())
self.assertTrue(w.storage_glance_default.
find_element_by_tag_name('input').is_selected())
w.next.click()
self.assertFalse(w.install_sahara.
find_element_by_tag_name('input').is_selected())
self.assertFalse(w.install_murano.
find_element_by_tag_name('input').is_selected())
示例6: add_controller_compute_nodes
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def add_controller_compute_nodes(cls):
PageObject.click_element(Nodes(), 'add_nodes')
Nodes().nodes_discovered[0].checkbox.click()
RolesPanel().controller.click()
Nodes().apply_changes.click()
PageObject.wait_until_exists(Nodes().apply_changes)
PageObject.click_element(Nodes(), 'add_nodes')
PageObject.click_element(Nodes(), 'nodes_discovered', 'checkbox', 0)
RolesPanel().compute.click()
Nodes().apply_changes.click()
PageObject.wait_until_exists(Nodes().apply_changes)
示例7: test_load_default_bonding
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def test_load_default_bonding(self):
"""Load default bonding
Scenario:
1. Select two interfaces
2. Click bond interfaces
3. Click load defaults
4. Verify that interfaces aren't bonded
"""
with InterfacesSettings() as s:
s.interfaces[0].interface_checkbox.click()
s.interfaces[1].interface_checkbox.click()
s.bond_interfaces.click()
s.apply.click()
time.sleep(2)
self.assertEqual(len(s.interfaces), 2, 'Interfaces amount not 2')
PageObject.click_element(s, 'load_defaults')
PageObject.wait_until_exists(s.interfaces[0].bond_mode)
self.assertEqual(len(s.interfaces), 3, 'Interfaces amount not 3')
示例8: setUp
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Create environment with Neutron gre
2. Open created environment
3. Add controller node
4. Open interface configuration of the node
"""
BaseTestCase.clear_nailgun_database()
BaseTestCase.setUp(self)
preconditions.Environment.simple_neutron_gre()
PageObject.click_element(Nodes(), 'add_nodes')
PageObject.click_element(Nodes(), 'nodes_discovered', 'checkbox', 0)
RolesPanel().controller.click()
Nodes().apply_changes.click()
PageObject.wait_until_exists(Nodes().apply_changes)
Nodes().nodes[0].details.click()
NodeInfo().edit_networks.click()
示例9: aut
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import wait_until_exists [as 别名]
def aut(cls):
Authorization().login_inputfield.click()
Authorization().login_inputfield.send_keys(Fuel_UI_Login)
Authorization().password_inputfield.click()
Authorization().password_inputfield.send_keys(Fuel_UI_Password)
Authorization().login_button.click()
PageObject.wait_until_exists(Header().logo)
Header().logo.is_displayed()
browser.driver.execute_script("jQuery.fx.off = true")
browser.driver.execute_script(
"""
$('head').append(
'<style type="text/css">
* {
-webkit-transition-duration: 0.00000001s !important;
-moz-transition: 0.00000001s !important;
transition-duration: 0.00000001s !important;
}
</style>')
""".replace(
"\n", ""
)
)