• 手机自动化测试: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# 一个数组集合,任意组合,不遗漏,不重复
    C# 对象遍历 string类型 null转空字符串和去前后空格
    mysql中varchar可以存多少汉字
    ping ipconfig telnet
    mysql 生成UUID() 即 ORACLE 中的guid()函数
    a标签的href和onclick
    JQuery设置checkbox选中或取消等相关操作
    JS eval()函数
    ztree设置节点checked,选中某节点等相关操作
    Windows数据库定时备份
  • 原文地址:https://www.cnblogs.com/poptest/p/4956502.html
Copyright © 2020-2023  润新知