最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

robotframework

互联网 admin 6浏览 0评论

robotframework

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

 

 

转载于:.html

robotframework

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

 

 

转载于:.html

发布评论

评论列表 (0)

  1. 暂无评论