• 你需要做的就是 derivedDataPath 中写上你自己的配置成功的 wda 目录,另外一台手机理论上就一个 sesion 去控制,单线程运行就行了,我不明白多线程启动 session 是什么意思?难道还可以多个 session 控制一台手机,这样不会乱掉嘛?

  • 关于第一点,加 id 是可以解决这个问题,但是开发就是不加,要让他们加需要领导协调,比较麻烦。
    关于第二点,我的目的其实是要获取一个控件的 text,然而在没有 id 或者不使用 xpath 的情况下,用相对的写法,符合 **/other/other/StaticText 可能有 10 几个,要精确定位,就是需要写成 **/XCUIElementTypeWindow/other/other/StaticText,令人郁闷的是,不同手机同一个元素可能是 **/XCUIElementTypeWindow/other/other/other/other/StaticText

  • "useNewWDA": False,
    'usePrebuiltWDA': True,
    "webDriverAgentUrl": "http://localhost:8100",
    'derivedDataPath': "/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent",

  • Appium 的 ios 中 webview 问题 at November 30, 2020

    https://github.com/appium/appium/issues/14825
    这个可能是解决的方法,但是我貌似我没看懂,“Use "accessible={false}" for the parent container view..” 这句话什么意思?是说开发的包要这样配,还是什么。
    “50 is the default value set to prevent endless loops. You could customize it by changing the snapshotMaxDepth setting”
    这个 snapshotMaxDepth 是什么东西?

  • Appium 的 ios 中 webview 问题 at November 26, 2020

    我这个地方并不是永久找不到元素,就是数据少的时候可以找到元素,但是我翻页操作后就没有了,我只能怀疑是 appium 不兼容的 bug 了

  • 总结一下,ios 测试时不重新安装 wda 的方法
    1.xcode 中连接 wda
    2.启动 capbility 中配置 usePrebuiltWDA,webDriverAgentUrl 及 derivedDataPath
    3.不能配置 useNewWDA
    4.如果配置 localhost,尝试使用http://localhost:8100/statusiproxy,看看有没有返回,如果没有手动启动 8100 8100 开启代理

  • 知道原因了,我加了一个参数 "useNewWDA": True,注释掉就行了😓 ,感谢提供思路。。

  • 我应该确保绑定的 wda 就是我启动 test 的 wda,因为我每次启动测试用例,原先 test 状态的 wda 都会 crash,上面 2 个参数也尝试了,一样的报错,感觉是我启动了 wda,然后我启动 appium 的时候也启动了同一个工程的 wda 造成了冲突,从而 crash 了,有没有办法让我启动 session 的时候不启动 wda 估计就成功了。

  • 但是这个参数貌似是起作用的,我关闭 wda,然后参数带上 url,会启动失败

  • 尝试了下貌似还是不行,在 cdesire_caps 增加了 webDriverAgentUrl,但是运行后原先连的 xcode 就 crash 了。

    Restarting after unexpected exit or crash in UITestingUITests/testRunner; summary will include totals from previous launches.
    
    Test Suite 'Selected tests' started at 2020-11-24 14:57:18.335
    Test Suite 'WebDriverAgentRunner.xctest' started at 2020-11-24 14:57:18.338
    Test Suite 'WebDriverAgentRunner.xctest' failed at 2020-11-24 14:57:18.339.
         Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.001) seconds
    Test Suite 'WebDriverAgentLib.framework' started at 2020-11-24 14:57:18.341
    Test Suite 'WebDriverAgentLib.framework' passed at 2020-11-24 14:57:18.342.
         Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
    Test Suite 'Selected tests' failed at 2020-11-24 14:57:18.344.
         Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.010) seconds
    
    
    Test session log:
        /var/folders/fg/6dxmk55x3qqdyt75c_h4xl7r0000gn/T/com.apple.dt.XCTest/IDETestRunSession-002DB694-94E7-4917-BDDB-162D8A71714A/WebDriverAgentRunner-2A33550B-18DF-4157-B56D-6A6E5652E0CF/Session-WebDriverAgentRunner-2020-11-24_145654-BsOKVu.log