Esempio n. 1
0
def login_domain(request, driver):
    """域管理员登录"""
    log.info("域管理员:%s登录" % domain_data["username"])
    login = loginaction.Login(driver)
    login.login(domain_data["username"], domain_data["password"])

    def end():
        log.info("测试用例执行完成,登出系统")
        driver.origin_driver.delete_all_cookies()

    request.addfinalizer(end)
    return driver
Esempio n. 2
0
def login_admin(request, driver):
    """用户登录"""
    log.info("用户登录")
    login = loginaction.Login(driver)
    login.login('15928009283', 'www123456.')

    def end():
        log.info("测试用例执行完成,登出系统")
        driver.origin_driver.delete_all_cookies()

    request.addfinalizer(end)
    return driver
Esempio n. 3
0
def login_admin(request, driver):
    """系统管理员登录"""
    log.info("系统管理员登录")
    login = loginaction.Login(driver)
    login.login('系统管理员', '123456')

    def end():
        log.info("测试用例执行完成,登出系统")
        driver.origin_driver.delete_all_cookies()

    request.addfinalizer(end)
    return driver