本文整理汇总了Python中pages.home.Home.click_next方法的典型用法代码示例。如果您正苦于以下问题:Python Home.click_next方法的具体用法?Python Home.click_next怎么用?Python Home.click_next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.click_next方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_datadriven_rbac
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_next [as 别名]
def test_datadriven_rbac(self, mozwebqa, org, perm_name, resource, verbs, allowed, disallowed):
"""
Perform a data driven test related to role based access controls.
All parameters are fullfilled by the data.
:param org: Organization Name
:param perm_name: Permission name
:param resource: Resource
:param verbs: A tuple of verbs
:returns: Pass or Fail for the test
"""
sysapi = ApiTasks(mozwebqa)
home_page = Home(mozwebqa)
rolestab = RolesTab(mozwebqa)
role_name = "role_%s" % (home_page.random_string())
perm_name = "perm_%s" % (home_page.random_string())
username = "user%s" % home_page.random_string()
email = username + "@example.com"
password = "redhat%s" % (home_page.random_string())
sysapi.create_org(org)
sysapi.create_user(username, password, email)
home_page.login()
home_page.tabs.click_tab("administration_tab")
home_page.tabs.click_tab("roles_administration")
home_page.click_new()
rolestab.create_new_role(role_name)
rolestab.click_role_permissions()
rolestab.role_org(org).click()
rolestab.click_add_permission()
rolestab.select_resource_type(resource)
home_page.click_next()
for v in verbs:
home_page.select('verbs', v)
home_page.click_next()
rolestab.enter_permission_name(perm_name)
rolestab.enter_permission_desc('Added by QE test.')
rolestab.click_permission_done()
rolestab.click_root_roles()
rolestab.click_role_users()
rolestab.role_user(username).add_user()
home_page.header.click_logout()
home_page.login(username, password)
for t in allowed:
Assert.true(t(home_page))
for t in disallowed:
Assert.false(t(home_page))
#home_page.header.click_logout()