當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。