zoukankan      html  css  js  c++  java
  • 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 都会省略掉后面两个选填参数,都忘记后面两个参数的作用了。

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

  • 相关阅读:
    比较两个json数组是否有相同的选项
    使用gulp实现静态资源版本号替换
    Happy Halloween
    前端学习plan
    Python之函数式编程
    秋意浓
    2018给自己个plan,给自己一个小目标
    see goodbye with 2017
    杂记(一)
    The fruit in mid-summer
  • 原文地址:https://www.cnblogs.com/star12111/p/13027906.html
Copyright © 2011-2022 走看看