本文整理汇总了Python中pageobjects.base.PageObject.click_element方法的典型用法代码示例。如果您正苦于以下问题:Python PageObject.click_element方法的具体用法?Python PageObject.click_element怎么用?Python PageObject.click_element使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pageobjects.base.PageObject
的用法示例。
在下文中一共展示了PageObject.click_element方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete_node
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_delete_node(self):
"""Delete one node and deploy changes
Scenario:
1. Add controller and compute node
2. Deploy changes
3. Delete one node
4. Deploy changes
5. Verify that only one node is present
"""
self.test_add_nodes()
with Nodes() as n:
n.nodes[1].checkbox.click()
n.delete_nodes.click()
with DeleteNodePopup() as p:
p.delete.click()
p.wait_until_exists()
time.sleep(1)
self.assertEqual("pending deletion", Nodes().nodes[1].status.text.lower(), "Node status is Pending Deletion")
Nodes().deploy_changes.click()
DeployChangesPopup().deploy.click()
PageObject.click_element(TaskResultAlert(), "close")
with Nodes() as n:
self.assertEqual(1, len(n.nodes), "Nodes amount")
for node in n.nodes:
self.assertEqual("ready", node.status.text.lower(), "Node status is READY")
示例2: test_ha_mode
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_ha_mode(self):
"""Create environment with HA mode
Scenario:
1. Create environment with HA mode
2. Click on created environment
3. Verify that correct environment name is displayed
4. Click on information icon and verify
all information is displayed correctly
"""
with Wizard() as w:
w.name.send_keys(OPENSTACK_CENTOS)
w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
w.next.click()
w.mode_ha_compact.click()
for i in range(5):
w.next.click()
w.create.click()
w.wait_until_exists()
cb = Environments().create_cluster_boxes[0]
cb.click()
with Nodes() as n:
self.assertEqual(PageObject.get_text(n, 'env_name'),
OPENSTACK_CENTOS)
PageObject.click_element(n, 'info_icon')
self.assertIn(OPENSTACK_CENTOS, PageObject.get_text
(n, 'env_details'))
self.assertIn('Multi-node with HA', n.env_details.text)
示例3: test_inactive_one_selected
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_inactive_one_selected(self):
"""Check bond buttons are inactive if one interface is selected
Scenario:
1. Select one interface
2. Verify bond and unbond buttons are disabled
"""
with InterfacesSettings() as s:
PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
self.assertFalse(s.bond_interfaces.is_enabled())
self.assertFalse(s.unbond_interfaces.is_enabled())
示例4: test_cancel_bonding
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_cancel_bonding(self):
"""Cancel bonding
Scenario:
1. Select two interfaces
2. Click bond interfaces
3. Click cancel changes
4. Verify that interfaces aren't bonded
"""
with InterfacesSettings() as s:
PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
s.interfaces[1].interface_checkbox.click()
s.bond_interfaces.click()
s.cancel_changes.click()
self.assertEqual(len(s.interfaces), 3, 'Interfaces amount')
示例5: test_unbond_interfaces
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_unbond_interfaces(self):
"""Unbond interfaces
Scenario:
1. Select two interfaces
2. Click bond interfaces
3. Click unbond defaults
4. Verify that interfaces aren't bonded
"""
with InterfacesSettings() as s:
PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
s.interfaces[1].interface_checkbox.click()
s.bond_interfaces.click()
s.interfaces[0].interface_checkbox.click()
s.unbond_interfaces.click()
self.assertEqual(len(s.interfaces), 3, 'Interfaces amount not 3')
示例6: test_bond_interfaces
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_bond_interfaces(self):
"""Bond two interfaces
Scenario:
1. Select two interfaces
2. Click bond interfaces
3. Verify that interfaces were bonded
"""
with InterfacesSettings() as s:
PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
s.interfaces[1].interface_checkbox.click()
self.assertTrue(s.bond_interfaces.is_enabled())
s.bond_interfaces.click()
s.interfaces[0].bond_mode
self.assertFalse(s.bond_interfaces.is_enabled())
self.assertFalse(s.unbond_interfaces.is_enabled())
示例7: test_load_default_bonding
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [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 click_element [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: reset_env
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def reset_env(cls):
PageObject.click_element(Actions(), 'reset')
PageObject.wait_element(Actions(), 'reset_popup')
time.sleep(2)
PageObject.click_element(Actions(), 'reset_popup')
PageObject.click_element(Tabs(), 'nodes')
PageObject.long_wait_element(Actions(), 'pending_nodes')
示例10: test_bond_mode
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def test_bond_mode(self):
"""Change bond modes
Scenario:
1. Select two interfaces
2. Click bond interfaces
3. Change bond modes
4. Verify that modes are saved correctly
"""
with InterfacesSettings() as s:
PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
s.interfaces[1].interface_checkbox.click()
s.bond_interfaces.click()
s.interfaces[0].select_mode.select_by_visible_text('Balance SLB')
self.assertEqual(s.interfaces[0].select_mode.
first_selected_option.text,
'Balance SLB', 'Text is Balance SLB')
s.interfaces[0].select_mode.\
select_by_visible_text('LACP Balance TCP')
self.assertEqual(s.interfaces[0].select_mode.
first_selected_option.text,
'LACP Balance TCP', 'Text is LACP Balance TCP')
示例11: add_controller_compute_nodes
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [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)
示例12: stop_deploy_process
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def stop_deploy_process(cls):
PageObject.click_element(Actions(), 'stop_deploy')
Actions().stop_deploy_popup.click()
PageObject.long_wait_element(Actions(), 'pending_nodes')
示例13: reset_env
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def reset_env(cls):
PageObject.click_element(Actions(), 'reset')
Actions().reset_popup.click()
PageObject.long_wait_element(Actions(), 'pending_nodes')
示例14: stop_deploy_process
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def stop_deploy_process(cls):
PageObject.click_element(Actions(), 'stop_deploy')
PageObject.wait_element(Actions, "stop_deploy_popup")
PageObject.click_element(Actions(), 'stop_deploy_popup')
PageObject.click_element(Tabs(), 'nodes')
PageObject.long_wait_element(Actions(), 'pending_nodes')
示例15: cancel_reset
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import click_element [as 别名]
def cancel_reset(cls):
Actions().reset.click()
PageObject.click_element(Actions(), 'cancel_popup')
PageObject.click_element(Tabs(), 'nodes')