本文整理汇总了Python中robottelo.ui.navigator.Navigator.go_to_products方法的典型用法代码示例。如果您正苦于以下问题:Python Navigator.go_to_products方法的具体用法?Python Navigator.go_to_products怎么用?Python Navigator.go_to_products使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类robottelo.ui.navigator.Navigator
的用法示例。
在下文中一共展示了Navigator.go_to_products方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: assert_key_from_product
# 需要导入模块: from robottelo.ui.navigator import Navigator [as 别名]
# 或者: from robottelo.ui.navigator.Navigator import go_to_products [as 别名]
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))
示例2: assert_key_from_product
# 需要导入模块: from robottelo.ui.navigator import Navigator [as 别名]
# 或者: from robottelo.ui.navigator.Navigator import go_to_products [as 别名]
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)
示例3: assert_key_from_product
# 需要导入模块: from robottelo.ui.navigator import Navigator [as 别名]
# 或者: from robottelo.ui.navigator.Navigator import go_to_products [as 别名]
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)