本文整理匯總了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)