• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python ui.navigate_to函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: test_broken_angular_select

def test_broken_angular_select(request):
    """Test that checks the fancy selects do not break.

    Prerequisities:
        * A fresh downstream appliance

    Steps:
        1) Create a catalog.
        2) Create a catalog item, can be Generic and assign the catalog and OSE Installer dialog
            for testing purposes
        3) Try ordering the service, but instead of confirming the form, try changing some select.
    """
    # OSE Installer dialog, one dropdown from it
    the_select = AngularSelect("param_operatingSystemType")
    cat = Catalog("Test_catalog_{}".format(fauxfactory.gen_alpha()))
    cat.create()
    request.addfinalizer(cat.delete)
    item = CatalogItem(
        item_type="Generic",
        name="Catitem_{}".format(fauxfactory.gen_alpha()),
        description=fauxfactory.gen_alpha(),
        display_in=True,
        catalog=cat.name,
        dialog="azure-single-vm-from-user-image")
    item.create()
    request.addfinalizer(item.delete)
    sc = service_catalogs.ServiceCatalogs(item.name)
    navigate_to(sc, 'Order')
    # The check itself
    fill(the_select, "Linux")
    assert not the_select.is_broken, "The select displayed itself next ot the angular select"
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:31,代码来源:test_ui_problems.py


示例2: load_details

 def load_details(self, refresh=False):
     navigate_to(self, 'Details')
     if not self.db_id or refresh:
         tmp_dmn = self.domain(method='db')
         self.db_id = tmp_dmn.db_id
     if refresh:
         tb.refresh()
开发者ID:rananda,项目名称:cfme_tests,代码行数:7,代码来源:domain.py


示例3: load_details

 def load_details(self, refresh=False):
     navigate_to(self, 'Details')
     if not self.db_id or refresh:
         tmp_ser = self.server(method='db')
         self.db_id = tmp_ser.db_id
     if refresh:
         tb.refresh()
开发者ID:rananda,项目名称:cfme_tests,代码行数:7,代码来源:server.py


示例4: test_pull_splitter_persistence

def test_pull_splitter_persistence(location):
    navigate_to(*location)
    # First we move splitter to hidden position by pulling it left twice
    pull_splitter_left()
    pull_splitter_left()
    navigate_to(Server, 'Dashboard')
    try:
        navigate_to(*location)
    except (TypeError, CannotScrollException):
        # this exception is expected here since
        # some navigation commands try to use accordion when it is hidden by splitter
        pass

    # Then we check hidden position splitter
    if not pytest.sel.elements("//div[@id='left_div'][contains(@class, 'hidden-md')]"):
        pytest.fail("Splitter did not persist when on hidden position!")
    # Then we iterate over all the other positions
    for position in ["col-md-2", "col-md-3", "col-md-4", "col-md-5"]:
        # Pull splitter left
        pull_splitter_right()
        navigate_to(Server, 'Dashboard')
        navigate_to(*location)
        # Then check its position
        if not pytest.sel.elements("//div[@id='left_div'][contains(@class, {})]"
                .format(unescape(quoteattr(position)))):
            pytest.fail("Splitter did not persist when on " + str(position) + " position!")
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:26,代码来源:test_splitter.py


示例5: download

 def download(self, extension):
     navigate_to(self, "Details")
     extensions_mapping = {'txt': 'Text', 'csv': 'CSV', 'pdf': 'PDF'}
     try:
         download_btn("Download as {}".format(extensions_mapping[extension]))
     except:
         raise ValueError("Unknown extention. check the extentions_mapping")
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:7,代码来源:reports.py


示例6: _get_state

 def _get_state():
     navigate_to(cls, 'Saved')
     row = records_table.find_row("queued_at", queued_at)
     status = sel.text(row.status).strip().lower()
     assert status != "error", sel.text(row)
     return status == version.pick({"5.6": "finished",
                                    "5.7": "complete"})
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:7,代码来源:reports.py


示例7: create

 def create(self):
     navigate_to(self, 'Add')
     fill(self.form, {'name_txt': self.name,
                      'vm_restriction_select': self.vm_restriction,
                      'product_features_tree': self.product_features},
          action=form_buttons.add)
     flash.assert_success_message('Role "{}" was saved'.format(self.name))
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:7,代码来源:access_control.py


示例8: update

 def update(self, updates):
     navigate_to(self, 'Edit')
     fill(self.form, {'name_txt': updates.get('name'),
                      'vm_restriction_select': updates.get('vm_restriction'),
                      'product_features_tree': updates.get('product_features')},
          action=form_buttons.save)
     flash.assert_success_message('Role "{}" was saved'.format(updates.get('name', self.name)))
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:7,代码来源:access_control.py


示例9: _retrieve_ext_auth_user_groups

 def _retrieve_ext_auth_user_groups(self):
     navigate_to(self, 'Add')
     fill(self.group_form, {'lookup_ldap_groups_chk': True,
                            'user_to_look_up': self.user_to_lookup,
                            },)
     sel.wait_for_element(form_buttons.retrieve)
     sel.click(form_buttons.retrieve)
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:7,代码来源:access_control.py


示例10: delete

    def delete(self, from_dest='All'):
        """
        Delete the stack, starting from the destination provided by from_dest
        @param from_dest: where to delete from, a valid navigation destination for Stack
        """

        # Navigate to the starting destination
        if from_dest in navigator.list_destinations(self):
            navigate_to(self, from_dest)
        else:
            msg = 'cfme.cloud.stack does not have destination {}'.format(from_dest)
            raise DestinationNotFound(msg)

        # Delete using the method appropriate for the starting destination
        if from_dest == 'All':
            sel.check(Quadicon(self.name, self.quad_name).checkbox())
            cfg_btn("Remove Orchestration Stacks", invokes_alert=True)
        elif from_dest == 'Details':
            cfg_btn("Remove this Orchestration Stack", invokes_alert=True)

        sel.handle_alert()
        # The delete initiated message may get missed if the delete is fast
        try:
            flash.assert_message_contain("Delete initiated for 1 Orchestration Stacks")
        except FlashMessageException as ex:
            if 'No flash message contains' in ex.message:
                flash.assert_message_contain("The selected Orchestration Stacks was deleted")

        self.wait_for_delete()
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:29,代码来源:stack.py


示例11: exists

 def exists(self):
     try:
         navigate_to(self, 'Details')
     except CandidateNotFound:
         return False
     else:
         return True
开发者ID:kzvyahin,项目名称:cfme_tests,代码行数:7,代码来源:access_control.py


示例12: discover

def discover(credential, cancel=False, d_type="Amazon"):
    """
    Discover cloud providers. Note: only starts discovery, doesn't
    wait for it to finish.

    Args:
      credential (cfme.Credential):  Amazon discovery credentials.
      cancel (boolean):  Whether to cancel out of the discover UI.
    """
    navigate_to(CloudProvider, "Discover")
    form_data = {"discover_select": d_type}
    if credential:
        form_data.update(
            {
                "username": credential.principal,
                "password": credential.secret,
                "password_verify": credential.verify_secret,
            }
        )
    fill(
        discover_form,
        form_data,
        action=form_buttons.cancel if cancel else discover_form.start_button,
        action_always=True,
    )
开发者ID:rananda,项目名称:cfme_tests,代码行数:25,代码来源:__init__.py


示例13: load_details

 def load_details(self):
     # todo: to remove this context related functionality along with making provider
     # param mandatory
     if not self.provider:
         navigate_to(self, 'Details')
     else:
         navigate_to(self, 'DetailsFromProvider')
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:7,代码来源:datastore.py


示例14: load_details

 def load_details(self, refresh=False):
     navigate_to(self, 'Details')
     if not self.db_id or refresh:
         tmp_dsource = self.datasource(method='db')
         self.db_id = tmp_dsource.db_id
     if refresh:
         tb.refresh()
开发者ID:jteehan,项目名称:cfme_tests,代码行数:7,代码来源:datasource.py


示例15: queue_canned_report

    def queue_canned_report(cls, path):
        """Queue report from selection of pre-prepared reports.

        Args:
            *path: Path in tree after All Reports
        Returns: Value of Run At in the table so the run can be then checked.
        """
        cls.path = path
        navigate_to(cls, "Info")
        toolbar.select("Queue")
        flash.assert_no_errors()
        tabstrip.select_tab("Saved Reports")
        queued_at = sel.text(list(records_table.rows())[0].queued_at)

        def _get_state():
            navigate_to(cls, 'Saved')
            row = records_table.find_row("queued_at", queued_at)
            status = sel.text(row.status).strip().lower()
            assert status != "error", sel.text(row)
            return status == version.pick({"5.6": "finished",
                                           "5.7": "complete"})

        wait_for(
            _get_state,
            delay=3,
            message="wait for report generation finished",
            fail_func=toolbar.refresh()
        )
        return sel.text(list(records_table.rows())[0].run_at).encode("utf-8")
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:29,代码来源:reports.py


示例16: load_details

 def load_details(self, refresh=False):
     navigate_to(self, 'Details')
     if not self.db_id or refresh:
         tmp_msg = self.messaging(method='db')
         self.db_id = tmp_msg.db_id
     if refresh:
         tb.refresh()
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:7,代码来源:messaging.py


示例17: test_server_name

def test_server_name():
    """Tests that changing the server name updates the about page"""
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    navigate_to(current_appliance.server, 'Server')
    old_server_name = sel.value(BasicInformation.basic_information.appliance_name)
    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))
    # CFME updates about box only after any navigation BZ(1408681)
    navigate_to(current_appliance.server, 'Dashboard')

    # if version.current_version() < '5.7':
    #     current_server_name = InfoBlock('Session Information', 'Server Name').text
    #     navigate_to(current_appliance.server, 'About')
    # else:
    current_server_name = get_detail('Server Name')
    close_button = sel.element('//div[contains(@class, "about-modal-pf")]//button[@class="close"]')
    close_button.click()

    assert new_server_name == current_server_name, \
        "Server name in About section does not match the new name"

    clear_property_cache(store.current_appliance, 'configuration_details')

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))

    clear_property_cache(store.current_appliance, 'configuration_details')
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:31,代码来源:test_server_name.py


示例18: get_unassigned_policy_profiles

    def get_unassigned_policy_profiles(self):
        """ Return a set of Policy Profiles which are available but not assigned.

        Returns: :py:class:`set` of :py:class:`str` of Policy Profile names
        """
        navigate_to(self, 'ManagePolicies')
        return self._unassigned_policy_profiles
开发者ID:rananda,项目名称:cfme_tests,代码行数:7,代码来源:provider.py


示例19: _provisioner

    def _provisioner(template, provisioning_data, delayed=None):
        vm = Vm(name=vm_name, provider=provider, template_name=template)
        navigate_to(vm, 'ProvisionVM')

        fill(provisioning_form, provisioning_data, action=provisioning_form.submit_button)
        flash.assert_no_errors()

        request.addfinalizer(lambda: cleanup_vm(vm_name, provider))
        if delayed is not None:
            total_seconds = (delayed - datetime.utcnow()).total_seconds()
            row_description = 'Provision from [{}] to [{}]'.format(template, vm_name)
            cells = {'Description': row_description}
            try:
                row, __ = wait_for(requests.wait_for_request, [cells],
                                   fail_func=requests.reload, num_sec=total_seconds, delay=5)
                pytest.fail("The provisioning was not postponed")
            except TimedOutError:
                pass
        logger.info('Waiting for vm %s to appear on provider %s', vm_name, provider.key)
        wait_for(provider.mgmt.does_vm_exist, [vm_name], handle_exception=True, num_sec=600)

        # nav to requests page happens on successful provision
        logger.info('Waiting for cfme provision request for vm %s', vm_name)
        row_description = 'Provision from [{}] to [{}]'.format(template, vm_name)
        cells = {'Description': row_description}
        row, __ = wait_for(requests.wait_for_request, [cells],
                           fail_func=requests.reload, num_sec=900, delay=20)
        assert 'Successfully' in row.last_message.text and row.status.text != 'Error'
        return vm
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:29,代码来源:test_provisioning_dialog.py


示例20: all

 def all(cls):
     """Returns objects with all Widgets currently present."""
     navigate_to(Server, 'Dashboard')
     result = []
     for el in sel.elements(cls._all):
         result.append(cls(sel.get_attribute(el, "id")))
     return result
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:7,代码来源:dashboard.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python auxiliary_functions.remove_extra_items函数代码示例发布时间:2022-05-26
下一篇:
Python ui.navigate_to函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap