本文整理汇总了Python中helperKolabWAP.KolabWAPTestHelpers.select_domain方法的典型用法代码示例。如果您正苦于以下问题:Python KolabWAPTestHelpers.select_domain方法的具体用法?Python KolabWAPTestHelpers.select_domain怎么用?Python KolabWAPTestHelpers.select_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helperKolabWAP.KolabWAPTestHelpers
的用法示例。
在下文中一共展示了KolabWAPTestHelpers.select_domain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_domain_admin_user_type
# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import select_domain [as 别名]
def test_domain_admin_user_type(self):
kolabWAPhelper = KolabWAPTestHelpers(self.driver)
self.kolabWAPhelper = kolabWAPhelper
# login Directory Manager
kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")
kolabWAPhelper.select_domain("administrators.org")
username, emailLogin, password = kolabWAPhelper.create_user(
prefix = "admin")
# now edit the user
elem = self.driver.find_element_by_id("searchinput")
elem.send_keys(username)
elem.send_keys(Keys.RETURN)
time.sleep(0.5)
elem = self.driver.find_element_by_xpath("//tbody/tr/td[@class=\"name\"]")
self.assertEquals(username + ", " + username, elem.text, "Expected to select user " + username + " but was " + elem.text)
elem.click()
time.sleep(0.5)
# check if the user type is actually a domain admin
elem = self.driver.find_element_by_xpath("//form[@id='user-form']/fieldset/table/tbody/tr/td[@class='value']")
self.assertEquals("Domain Administrator", elem.text, "user type should be Domain Administrator, but was " + elem.text)
kolabWAPhelper.logout_kolab_wap()
示例2: test_domain_admin
# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import select_domain [as 别名]
def test_domain_admin(self):
kolabWAPhelper = KolabWAPTestHelpers(self.driver)
self.kolabWAPhelper = kolabWAPhelper
# login Directory Manager
kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")
kolabWAPhelper.select_domain("administrators.org")
username, emailLogin, password = kolabWAPhelper.create_user(
prefix = "admin",
overall_quota = "1gb",
default_quota = "100mb",
max_accounts = 3,
allow_groupware = True)
# TODO create domain, with domain admin
# TODO select domain
# TODO create user accounts
kolabWAPhelper.logout_kolab_wap()