美文网首页编程技术类
Appium常见问题列表之一

Appium常见问题列表之一

作者: 女王儿驾到 | 来源:发表于2016-08-11 19:34 被阅读894次

    无法安装appium_lib
    Appium-iOS 无法使用iOS模拟器
    默认运行appium服务器时执行scenario后总是重置模拟器
    连接不上服务器
    找不到被测试app

    1. 无法安装appium_lib

    解决办法:disable SIP of mac OS
    Mac OS X最新系统增加了更严格的权限保护SIP
    SIP: Mac OS X El Capitan系统完整性保护System Integrity Protection (SIP) http://blog.csdn.net/yulimin/article/details/49992031

    2. Appium-iOS 无法使用iOS模拟器

    第一次运行Appium时,需要对Instruments进行授权。不然的话会经常弹出对话框要求你输入密码。

    sudo authorize-ios
    

    Setting up instruments without delay (iwd) for xcode 7 and iOS >= 9.0
    a. 下载appium-instruments: https://github.com/appium/appium-instruments
    b. 切换到appium-instruments下运行(注意xcode的位置)

    sh appium-instruments/bin/xcode-iwd.sh /Applications/Xcode.app /Users/ryanwyu/workspace/appium-instruments
    

    tips :当你每次安装了新版本的xcode,你都需要重复以上操作。

    3. Appium-iOS 执行scenario后总是重置模拟器

    运行Appium 时候指定相关设置
    https://github.com/appium/appium/blob/ebcf3da165d06b6d9467b490a250008607e74a04/docs/en/writing-running-appium/default-capabilities-arg.md
    当前问题可以使用

    appium --no-reset
    

    tips :运行appium可以通过命令行,也可以通过Appium的mac OS X客户端,后者更直观,但注意相关设置若脚本中没有包含的相关默认设置

    4. 连接不上服务器

    使用Appium进行UI自动化测试需要先运行appium server, server忘记启动了或者有问题了,在运行测试脚本的时候,常常会看到这样的错误提示
    ERROR: Unable to connect to Appium. Is the server running? (RuntimeError)
    办法就是重启appium server

    5. ​找不到被测试app

    注意appium server url 是不是你当前电脑IP; 被测app的路径必须是绝对路径

    相关文章

      网友评论

        本文标题:Appium常见问题列表之一

        本文链接:https://www.haomeiwen.com/subject/ivsssttx.html