dcsxlh

导航

 

1、关键字如下

 

 

 1.1Get Text

 

 

 

1.2Get Value

 

 

 

 

 

 

 

 

 

2.#上下滑动(滚动条)

 

 

Open Browser http://www.jd.com gc
Maximize Browser Window
sleep 3
#上下滑动(滚动条)
Execute Javascript window.scrollTo(0,10000) #滑动从顶端到2000的位置
sleep 2
Execute Javascript window.scrollTo(0,0) #返回到顶端
Comment sleep 2
Comment ${set} Get Window Size #获取当前窗口的大小
Comment log ${set}

 

3、#获取当前窗口的大小Get Window Size

 

 

 

${set} Get Window Size #获取当前窗口的大小
log ${set}

 

 

4、单选按钮,复选按钮

 

 

Open Browser file:///D:\\bao\\baoan\\table.html gc
Maximize Browser Window
sleep 2
Comment #单选按钮点击
Comment Click Element css=[value=boy]
Comment Click Element xpath=//*[@value="boy"] #/html/body/form/table/tbody/tr[5]/td[2]/input[1]
Comment Click Element value=boy #直接用报错
Comment Select Radio Button sex girl
Comment Comment #复选按钮
Comment Click Element css=[value=html]
Comment Click Element xpath=//*[@value="python"]
Comment Select Checkbox css=[value=linux]

 

 

 

 

 

 6、

 

 

 

 

 

 

 

 

 

7、

 

 

 

 

Open Browser https://mail.163.com/ gc
Maximize Browser Window
sleep 2
#进入iframe框
Comment Input Text name=email a1331653316
Select Frame xpath=//*[@id="loginDiv"]/iframe[1] #进入ifame
sleep 2
Input Text name=email duocehsi
sleep 2
Input Password name=password 123456
sleep 2
unselect frame #退出iframe框
sleep 2

Click Element css=[data-tj-name=b_nav_help_click]

、、

 

8、

 

 

 

 

 

 

 

 

 

 

 

 

9、

 

 

 

 

 

 

 

 10.

 

 

 

 

方法一:

 

 

方法二:Mouse Over

 

 

Open Browser https://www.ctrip.com/?sid=155952&allianceid=4897&ouid=index gc
Maximize Browser Window
sleep 2
Click Element xpath=/html/body/div[5]/div/ul[1]/li/a/span #/html/body/div[5]/div/ul[1]/li/a/span
Comment Mouse Over xpath=/html/body/div[5]/div/ul[1]/li/a/span #模拟鼠标悬停
Click Element id=ctrip_hk
Comment /html/body/div[5]/div/ul[1]/li/a/span #表示language

 

posted on 2020-10-08 18:20  多测师_肖sir  阅读(278)  评论(0编辑  收藏  举报