RobotFramework-登录

*** Settings ***
Library           Selenium2Library

*** Test Cases ***
login
    [Setup]    open browser    http://XXX/XXX/login
    input text    id=u14_input    admin
    input text    id=u15_input    123456
    SLEEP    1
    click element    xpath=//*[@id="u17"]/p/span
    Comment    press key    id=u15_input    \13
    ${loginName}    get text    id=spanLoginNickName
    log    ${loginName}
    Should Be Equal As Strings    ${loginName}    管理员
    [Teardown]    close browser

原文地址:https://www.cnblogs.com/nzyjlr/p/5097887.html