本文整理汇总了Python中pageobjects.base.PageObject.get_text方法的典型用法代码示例。如果您正苦于以下问题:Python PageObject.get_text方法的具体用法?Python PageObject.get_text怎么用?Python PageObject.get_text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pageobjects.base.PageObject
的用法示例。
在下文中一共展示了PageObject.get_text方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_ha_mode
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import get_text [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)
示例2: test_simple_mode
# 需要导入模块: from pageobjects.base import PageObject [as 别名]
# 或者: from pageobjects.base.PageObject import get_text [as 别名]
def test_simple_mode(self):
"""Create environment with simple mode
Scenario:
1. Create environment with simple mode
2. Click on created environment
3. Verify that correct environment name is displayed
4. 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_multinode.click()
for i in range(5):
w.next.click()
w.create.click()
w.wait_until_exists()
self.get_home()
cb = Environments().create_cluster_boxes[0]
cb.click()
with Nodes() as n:
self.assertIn(OPENSTACK_CENTOS,
PageObject.get_text(n, 'env_summary'))
self.assertIn('Multi-node', n.env_summary.text)