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


Python ui.navigate_to函数代码示例

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


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


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