robot framework WEBUI 移动下拉框

web自动化,需要移动滚动条的操作,可以使用 键盘的 page down 和 page on

效果:

 

 

使用如下:

1.首先 导入包 AutoItLibrary(AutoItLibrary 已安装 ,并导入成功)

 

 

 

2.

 

 1     sleep    2    #预防 chromedriver 未启动
 2     Selenium2Library.Open Browser    https://www.cnblogs.com/whycai/    Chrome    #打开浏览器
 3     sleep    3
 4     Selenium2Library.Maximize Browser Window    #浏览器最大化
 5     AutoITLibrary.send    {PGDN}    #按键 page down
 6     sleep    2
 7     AutoITLibrary.send    {PGDN}
 8     sleep    2
 9     AutoITLibrary.send    {PGUP}    #按键 page on
10     sleep    2
11     Selenium2Library.Close Browser

 

posted @ 2020-01-20 12:07  菜小鱼~  阅读(356)  评论(0编辑  收藏  举报