示例#1
0
def _login(driver, user, psw):
    mgtv = Base(driver)
    driver.get("https://www.youku.com")
    mgtv.click(loc_to_user_login_path)
    mgtv.send_words(loc_to_user_inputbox, user)
    mgtv.send_words(loc_to_psw_inputbox, psw)
    mgtv.click(loc_to_agree)
    mgtv.click(loc_to_login_btn)
示例#2
0
def _logout(driver):
    base = Base(driver)
    # driver.get(host+"/disk/home?")
    base.click(loc_logout)
示例#3
0
def _login(driver,username="******",psw="Qaz123456!"):
    base = Base(driver)
    # driver.get(host)  ## 在这边在写一次打开网址,会导致运行脚本时多次打开空白网页
    base.send_words(loc_userName,username)
    base.send_words(loc_psw,psw)
    base.click(loc_submit_btn)