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


Python navigator.Navigator类代码示例

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


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

示例1: assert_key_from_product

 def assert_key_from_product(self, name, product, repo=None):
     """Assert the key association after deletion from product tab."""
     nav = Navigator(self.browser)
     nav.go_to_products()
     self.wait_for_ajax()
     prd_element = self.search_entity(product, locators["prd.select"], katello=True)
     if prd_element:
         prd_element.click()
         self.wait_for_ajax()
         if repo is not None:
             self.click(tab_locators["prd.tab_repos"])
             strategy = locators["repo.select"][0]
             value = locators["repo.select"][1]
             self.click((strategy, value % repo))
             self.click(locators["repo.gpg_key_edit"])
             element = Select(self.find_element(locators["repo.gpg_key_update"])).first_selected_option.text
             if element == "":
                 return None
             else:
                 raise UIError('GPGKey "{0}" is still assoc with selected repo'.format(name))
         else:
             self.click(tab_locators["prd.tab_details"])
             self.click(locators["prd.gpg_key_edit"])
             element = Select(self.find_element(locators["prd.gpg_key_update"])).first_selected_option.text
             if element == "":
                 return None
             else:
                 raise UIError('GPG key "{0}" is still assoc with product'.format(name))
     else:
         raise UIError('Could not find the product "{0}"'.format(product))
开发者ID:ares,项目名称:robottelo,代码行数:30,代码来源:gpgkey.py

示例2: search

 def search(self, name):
     """
     Searches existing medium from UI
     """
     nav = Navigator(self.browser)
     nav.go_to_installation_media()
     element = self.search_entity(name, locators["medium.medium_name"])
     return element
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3: search

 def search(self, name):
     """
     Searches existing architecture from UI
     """
     nav = Navigator(self.browser)
     nav.go_to_architectures()
     element = self.search_entity(name, locators['arch.arch_name'])
     return element
开发者ID:bluesky-sgao,项目名称:robottelo,代码行数:8,代码来源:architecture.py

示例4: search

 def search(self, name):
     """
     Searches existing domain from UI
     """
     nav = Navigator(self.browser)
     nav.go_to_domains()
     element = self.search_entity(name, locators["domain.domain_description"])
     return element
开发者ID:BlackSmith,项目名称:robottelo,代码行数:8,代码来源:domain.py

示例5: search

 def search(self, name):
     """Searches existing template from UI"""
     self.scroll_page()
     nav = Navigator(self.browser)
     nav.go_to_provisioning_templates()
     element = self.search_entity(name,
                                  locators["provision.template_select"])
     return element
开发者ID:seandst,项目名称:robottelo,代码行数:8,代码来源:template.py

示例6: logout

    def logout(self):
        """
        Logout user from UI
        """

        if self.find_element(locators["login.gravatar"]):
            nav = Navigator(self.browser)
            nav.go_to_sign_out()
开发者ID:thomasmckay,项目名称:robottelo,代码行数:8,代码来源:login.py

示例7: search

 def search(self, name):
     """
     Searches existing operating system from UI
     """
     nav = Navigator(self.browser)
     nav.go_to_operating_systems()
     element = self.search_entity(name, locators["operatingsys.operatingsys_name"])
     return element
开发者ID:BlackSmith,项目名称:robottelo,代码行数:8,代码来源:operatingsys.py

示例8: logout

 def logout(self):
     """Logout user from UI"""
     # Scroll to top
     self.browser.execute_script('window.scroll(0, 0)')
     if self.wait_until_element(locators["login.gravatar"]) is None:
         raise UINoSuchElementError(
             "could not find login.gravatar to sign out")
     nav = Navigator(self.browser)
     nav.go_to_sign_out()
     self.wait_for_ajax()
开发者ID:connornishijima,项目名称:robottelo,代码行数:10,代码来源:login.py

示例9: logout

    def logout(self):
        """
        Logout user from UI
        """

        if self.find_element(locators["login.gravatar"]):
            nav = Navigator(self.browser)
            nav.go_to_sign_out()
        else:
            raise Exception(
                "could not find login.gravatar to sign out")
开发者ID:,项目名称:,代码行数:11,代码来源:

示例10: setUp

 def setUp(self):
     super(ActivationKey, self).setUp()
     # Make sure to use the Class' org_name instance
     if ActivationKey.org_name is None:
         ActivationKey.org_name = generate_name(8, 8)
         login = Login(self.browser)
         nav = Navigator(self.browser)
         org = Org(self.browser)
         login.login(self.katello_user, self.katello_passwd)
         nav.go_to_org()
         org.create(ActivationKey.org_name)
         login.logout()
开发者ID:,项目名称:,代码行数:12,代码来源:

示例11: assert_key_from_product

    def assert_key_from_product(self, name, product, repo=None):
        """
        Assert the key association after deletion from product tab
        """

        nav = Navigator(self.browser)
        nav.go_to_products()
        self.wait_for_ajax()
        prd_element = self.search_entity(product, locators["prd.select"],
                                         katello=True)
        if prd_element:
            prd_element.click()
            self.wait_for_ajax()
            if repo is not None:
                self.wait_until_element(tab_locators["prd.tab_repos"]).click()
                strategy = locators["repo.select"][0]
                value = locators["repo.select"][1]
                self.wait_until_element((strategy, value % repo)).click()
                self.wait_for_ajax()
                self.wait_until_element(locators["repo.gpg_key_edit"]).click()
                self.wait_for_ajax()
                element = Select(self.find_element
                                 (locators["repo.gpg_key_update"]
                                  )).first_selected_option.text
                if element == '':
                    return None
                else:
                    raise Exception(
                        "GPGKey '%s' is still assoc with selected repo" % name)
            else:
                self.wait_until_element(tab_locators
                                        ["prd.tab_details"]).click()
                self.wait_for_ajax()
                self.wait_until_element(locators["prd.gpg_key_edit"]).click()
                self.wait_for_ajax()
                element = Select(self.find_element
                                 (locators["prd.gpg_key_update"]
                                  )).first_selected_option.text
                if element == '':
                    return None
                else:
                    raise Exception(
                        "GPG key '%s' is still assoc with product" % name)
        else:
            raise Exception(
                "Couldn't find the product '%s'" % product)
开发者ID:connornishijima,项目名称:robottelo,代码行数:46,代码来源:gpgkey.py

示例12: assert_key_from_product

    def assert_key_from_product(self, key_name, product):
        """
        Assert the key association after deletion from product tab
        """

        nav = Navigator(self.browser)
        nav.go_to_products()
        prd_element = self.search_entity(product, locators["prd.select"], katello=True)
        if prd_element:
            prd_element.click()
            sleep_for_seconds(2)
            self.wait_until_element(tab_locators["prd.tab_details"]).click()
            element = self.find_element(locators["prd.gpg_key"]).get_attribute("innerHTML")
            if element is None:
                return None
            else:
                raise Exception("GPGKey '%s' is still associated with product" % key_name)
        else:
            raise Exception("Couldn't find the product '%s'" % product)
开发者ID:BlackSmith,项目名称:robottelo,代码行数:19,代码来源:gpgkey.py

示例13: login

    def login(self, username, password, organization=None):
        """
        Logins user from UI
        """

        if self.wait_until_element(locators["login.username"]):
            self.field_update("login.username", username)
            self.field_update("login.password", password)

            self.find_element(common_locators["submit"]).click()

            if self.find_element(common_locators["notif.error"]):
                return
            if self.find_element(locators["location.new"]):
                loc = Location(self.browser)
                loc.create(generate_name())
            if organization:
                nav = Navigator(self.browser)
                nav.go_to_select_org(organization)
开发者ID:,项目名称:,代码行数:19,代码来源:

示例14: login

 def login(self, username, password, organization=None, location=None):
     """Logins user from UI"""
     if self.wait_until_element(locators['login.username']):
         self.assign_value(locators['login.username'], username)
         self.assign_value(locators['login.password'], password)
         self.click(common_locators['submit'])
         if self.find_element(common_locators['notif.error']):
             return
         if location:
             nav = Navigator(self.browser)
             nav.go_to_select_loc(location)
         if organization:
             nav = Navigator(self.browser)
             nav.go_to_select_org(organization)
开发者ID:BlackSmith,项目名称:robottelo,代码行数:14,代码来源:login.py

示例15: navigate_to_entity

 def navigate_to_entity(self):
     """Navigate to Host Collection entity page"""
     Navigator.go_to_host_collections()
开发者ID:elyezer,项目名称:robottelo,代码行数:3,代码来源:systemgroup.py


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