zoukankan      html  css  js  c++  java
  • 手机自动化测试:appium问题解决

    手机自动化测试:appium问题解决

     

    Appium遇到问题:

    问题一:
    问题org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

    解决办法:
    (1)启动appium
    (2)运行cmd 输入 adb devices -l 查看UDID 如图:
    (3)再在cmd中输入 appium -a 127.0.0.1 -p4723 -Uf4a4d8bb (-a表示ip,-p表示端口,-U表示设备的udid 可以通过appium -h查看更多命令)
    (4)如果如下图所示 就表示 appium服务启动成功了,注意这个窗口不要关闭 因为这是appium的服务 关了就关了服务,后面过程无法执行,而且这个窗口也是 日志输出的窗口用于排错。

    问题二:
    问题:org.openqa.selenium.SessionNotCreatedException: A new session could not be created.
    (Original error: Device ZX1C622BU3 was not in the list of connected devices)
    (WARNING: The server did not provide any stacktrace information)

    解决办法:可能手机驱动未安装成功,虽然在adb devices中可以正常查看到devices


    问题三:
    问题:org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Waited 20 secs for selendroid server and it never showed up)

    解决办法:
    查看包的签名的和Activity
    例如:APP从I5版本后启动界面的capabilities.setCapability("appActivity", ".CordovaApp");
    从I5版本后Acitivity变成了MainActivity
    capabilities.setCapability("appActivity",".MainActivity");// 被测app的Activity类


    问题四:
    org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)

    解决方法:
    查看设备上是否安装Selendroid,或者升级Selendroid

    IOS问题五:
    org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)

    解决办法:IOS_webkit_debug_proxy –c –[Udid] -d

  • 相关阅读:
    swift制作framework过程
    Redis学习
    Mysql vs NoSql vs NewSql
    Mysql实践
    跨库分页解决方案[转]
    二分查找解题套路框架 [转]
    Service Mesh [转]
    Golang Case
    [转]分布式服务限流
    保险
  • 原文地址:https://www.cnblogs.com/poptest/p/4956502.html
Copyright © 2011-2022 走看看