RobotFrameWork+APPIUM实现对安卓APK的自动化测试----第六篇【AppiumLibrary等待函数介绍】
http://blog.csdn.net/deadgrape/article/details/50622441
废话不多说,少年们请看下面。
Wait Until Page Contains | text, timeout=None, error=None |
Waits until text appears on current page. Fails if timeout expires before the text appears. Seeintroduction for more information about timeoutand its default value. error can be used to override the default error message. See also Wait Until Page Does Not Contain, Wait Until Page Contains Element, Wait Until Page Does Not Contain Element and BuiltIn keyword Wait Until Keyword Succeeds. |
Wait Until Page Contains Element | locator, timeout=None, error=None |
Waits until element specified with locator appears on current page. Fails if timeout expires before the element appears. Seeintroduction for more information abouttimeout and its default value. error can be used to override the default error message. See also Wait Until Page Contains, Wait Until Page Does Not Contain Wait Until Page Does Not Contain Element and BuiltIn keyword Wait Until Keyword Succeeds. |
Wait Until Page Does Not Contain | text, timeout=None, error=None |
Waits until text disappears from current page. Fails if timeout expires before the text disappears. See introduction for more information about timeoutand its default value. error can be used to override the default error message. See also Wait Until Page Contains, Wait Until Page Contains Element, Wait Until Page Does Not Contain Element and BuiltIn keyword Wait Until Keyword Succeeds. |
Wait Until Page Does Not Contain Element | locator, timeout=None, error=None |
Waits until element specified with locator disappears from current page. Fails if timeout expires before the element disappears. Seeintroduction for more information abouttimeout and its default value. error can be used to override the default error message. See also Wait Until Page Contains, Wait Until Page Does Not Contain, Wait Until Page Contains Element and BuiltIn keyword Wait Until Keyword Succeeds. |
咳咳咳~我来给大家翻译翻译~搬个砖,
1.Wait Until Page Contains 等待直到界面包含什么文字信息才进行下一步,参数【text】需要检索的文本信息,【timeout=None】超时属性,也就是等待多少时间还不出现就结束该语句,【error=None】是否报错,作者是个懒人这个属性一直默认,有兴趣的同志们可以自己试试。
2.Wait Until Page Contains Element 等待直到界面包含什么元素才进行下一步,这里先说下元素等位都是locator的事情,如果对这个不太清楚的同志们坐等下一篇。
3.Wait Until Page Does Not Contain 等待直到界面不包含什么文字信息才进行下一步
4.Wait Until Page Does Not Contain Element 等待直到界面不包含什么元素才进行下一步
好啦这一篇内容不多,最后给大家一个万恶的函数,为啥这么说呢,因为简单粗暴无需动脑,就是【sleep】函数是BuiltIn的自带函数用法超级简单sleep | 10s,就OK了,下一篇作者打算和同志聊聊locator,坐标点击,和一些在项目中遇到的大中小各种坑 。
最后忍不住剑剑需要坐火车回家的同胞们,候车室里多保暖噢~O(∩_∩)O哈哈~,在这里祝大家过个好年。
最新文章
- App开发三种模式
- MySQL 调优基础(一) CPU与进程
- javascript 函数声明与函数表达式的区别
- js中把数据库时间转为正常值
- JavaScript 在函数中使用Ajax获取的值作为函数的返回值
- nginx的使用配置
- 第一百一十七节,JavaScript,DOM元素尺寸和位置
- RAID分类
- 2_linux 常用基本命令
- 【Discuz】关于出现“对不起,您安装的不是正版应用..”的解决方法
- 做了面向互联网部署的Dynamics 365 CE更改AD FS的登录页面
- 微软是如何重写C#编译器并使它开源的
- [转]How to Send Ethereum with Web3.js and Node
- wsgiref源码解析
- char 类型的操作函数
- fiddler学习总结--利用fiddler快速模拟mock
- 从零开始学 Web 之 HTML5(三)网络监听,全屏,文件读取,地理定位接口,应用程序缓存
- 微信小程序 --- 表单输入验证(手机号、邮箱验证、输入非空)
- 试用 openresty/lua-resty-shell
- nodeJs上传附件