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


Python base.PageObject类代码示例

本文整理汇总了Python中pageobjects.base.PageObject的典型用法代码示例。如果您正苦于以下问题:Python PageObject类的具体用法?Python PageObject怎么用?Python PageObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PageObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_delete_node

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

示例2: reset_env

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

示例3: test_rhsm

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

示例4: test_rhn_satellite

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

示例5: test_rhn_satellite

    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')
开发者ID:Axam,项目名称:fuel-main,代码行数:26,代码来源:test_releases.py

示例6: test_ha_mode

    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,代码行数:30,代码来源:test_environment.py

示例7: test_reset_redeploy

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

示例8: test_cancel_button

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

示例9: test_bond_buttons_inactive

    def test_bond_buttons_inactive(self):
        """Check bond buttons are inactive by default

        Scenario:
            1. Verify bond and unbond buttons are disabled
        """
        PageObject.find_element(InterfacesSettings(), 'bond_interfaces')
        self.assertFalse(InterfacesSettings().bond_interfaces.is_enabled())
        self.assertFalse(InterfacesSettings().unbond_interfaces.is_enabled())
开发者ID:shaikapsar,项目名称:fuel-main,代码行数:9,代码来源:test_configure_networks.py

示例10: test_diagnostic_snapshot

    def test_diagnostic_snapshot(self):
        """Generate diagnostic snapshot

        Scenario:
            1. Click generate diagnostic snapshot
            2. Verify that snapshot is available to download
        """
        Support().generate_snapshot.click()
        with Support() as s:
            PageObject.wait_element(s, "download_snapshot")
            self.assertTrue(s.download_snapshot.is_enabled(), '"Diagnostic Snapshot" is displayed')
开发者ID:jcheyer,项目名称:fuel-main,代码行数:11,代码来源:test_support.py

示例11: test_inactive_one_selected

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

示例12: add_controller_compute_nodes

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

示例13: test_capacity_audit

    def test_capacity_audit(self):
        """View capacity audit

        Scenario:
            1. Click view capacity audit
            2. Verify that system information is present
        """
        Support().view_capacity_audit.click()
        PageObject.wait_element(Support(), 'capacity_report')
        self.assertEqual(
            'Home/Support/Capacity',
            Header().breadcrumb.text,
            'Breadcrumb text'
        )
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:14,代码来源:test_support.py

示例14: test_cancel_bonding

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

示例15: test_bond_interfaces

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


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