** Settings *** Library Selenium2Library *** Test Cases *** login Open Browser https://www.baidu.com/ gc Set Browser Implicit Wait 30 Maximize Browser Window Click Element xpath=//div[@id='u1']/a[text()='登录'] Sleep 3s Click Element xpath=//p[text()='用户名登录'] Sleep 3s # 获取文本信息 ${login_text} Get Text xpath=//p[text()='用户名密码登录'] # 校验页面是否包含该文本信息 Should Contain ${login_text} 用户名密码登录 Sleep 3s # 校验页面是否包含元素 Wait Until Page Contains 用户名密码登录 30s Input Text xpath=//input[@name='userName'] 账号 Sleep 3s Input Password xpath=//input[@name='password'] 密码 Sleep 3s Click Button xpath=//input[@type='submit' and @value='登录' and @id='TANGRAM__PSP_10__submit'] Sleep 10s Close All Browsers