当前位置: 首页>>代码示例>>Python>>正文


Python PageObject.get_text方法代码示例

本文整理汇总了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)
开发者ID:Axam,项目名称:fuel-main,代码行数:32,代码来源:test_environment.py

示例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)
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:29,代码来源:test_environment.py


注:本文中的pageobjects.base.PageObject.get_text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。