【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    爱是大雾散尽时    #断言

 

posted @ 2022-07-10 18:09  hanyr  阅读(48)  评论(0)    收藏  举报