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

  • 相关阅读:
    新组件或功能怎么依附到已有的架构上
    高内聚、低耦合
    软件质量的定义
    软件架构与组件
    架构设计之拥抱着变化而设计(部分讲义分享)
    组件设计原则之概念篇(四)
    抽象类(接口类)的作用
    类,抽象基类,接口类三者间的区别与联系(C++)
    软件的可变性
    软件设计的复杂度
  • 原文地址:https://www.cnblogs.com/poptest/p/4956502.html
Copyright © 2011-2022 走看看