RF+appium自动化问题二解决思路

今天在做APP自动化练习“微信”项目的时候,碰到了一个问题。

 

报错:Message: A session is either terminated or not started

 

情况是:

 

本来碰到这个慢慢加载的时候,我首先想到的是用:sleep  120

尝试失败。

又换成:wait until page contains    微信

还是尝试失败。

思路没有错,就是哪个环节出错了。

后来百度看别人的博客,打开了思路。

 

具体解决办法:wait until page contains    微信     timeout=120

尝试成功。就是加上timeout=120  就成功了。

 

后来查看appium具体关键字的用法

Name:
Wait Until Page Contains


Source:
AppiumLibrary <test library>


Arguments:
[ text | timeout=timeout | error=error ]


Waits until `text` appears on current page.


Fails if `timeout` expires before the text appears. See `introduction` for more information about `timeout` and its default value.
`error` can be used to override the default error message.

 

 

以前我用Wait Until Page Contains 都会省略掉后面两个选填参数,都忘记后面两个参数的作用了。

还是需要多学习,多踩坑,才能慢慢成长。

 

posted @ 2020-06-01 22:20  知识在于点滴的积累  阅读(353)  评论(0编辑  收藏  举报