其他分享
首页 > 其他分享> > 【RF】WebUI Demo

【RF】WebUI Demo

作者:互联网

*** Settings ***
Library           DateTime
Library           Selenium2Library
Library           RequestsLibrary

*** Test Cases ***
UIWeb自动化
    Open Browser    https://novel.hctestedu.com/?m=2    gc    #gc指的chrome
    Comment    Set Selenium Speed    1    #每步都间隔1s
    Maximize Browser Window
    Set Selenium Implicit Wait    3
    Click Element    link=登录    # link超链接
    Comment    Click Link    /user/login.html    # 和上面操作一样
    Input Text    id=txtUName    13211111111
    Input Text    id=txtPassword    123456
    Click Element    id=btnLogin
    Click Element    link=爱在大雾散尽时
    Click Element    //*[@id="cFavs"]/a    #点击加入书架
    Wait Until Element Contains    //*[@id="cFavs"]/a    已在书架    #断言
    Click Element    link=我的书架
    Wait Until Element Contains    //*[@id="bookShelfList"]/tr/td[2]/a    爱是大雾散尽时    #断言

 

标签:Demo,Library,Click,RF,link,WebUI,Element,id,Wait
来源: https://www.cnblogs.com/hanyr/p/16463667.html