Appium mac 上的 Appium Inspector 测试 iOS 真机时,刷新页面卡,获取页面结构超时

sj · 2017年02月17日 · 最后由 liulx 回复于 2017年03月08日 · 2454 次阅读

在 mac 上用 appium inspector 测试 iOS 真机时部分页面刷新卡住,调试发现是获取页面结构时超时。
测试软件为海通证券 附上下载地址 https://e.htsec.com/ehtsec/views/htsec/software/softdown.html
如刷新海通证券的行情页的沪深页面时会卡住。

沪深页面:

卡住页面:

inspector 控制台输出信息为:

[HTTP] --> GET/wd/hub/session/5304e5b9-201c-47e6-b050-065ca9433aa3/source {}

[debug] [MJSONWP] Calling AppiumDriver.getPageSource() with args: ["5304e5b9-201c-47e6-b050-065ca9433aa3"]
[debug] [XCUITest] Executing command 'getPageSource'

[HTTP] <-- GET /wd/hub/session/5304e5b9-201c-47e6-b050-065ca9433aa3/source - - ms - - 

[Xcode] 2017-02-17 10:14:42.546851 XCTRunner[13180:4658550] Enqueue Failure: UI Testing Failure - Failure fetching attributes for element <XCAccessibilityElement: 0x17044b100> Device element: Error Domain=XCTestManagerErrorDomain Code=13 "Error copying attributes -25202" UserInfo={NSLocalizedDescription=Error copying attributes -25202} <unknown> 0 1

有人遇到过类似问题或者知道怎么解决吗?欢迎讨论!

共收到 3 条回复 时间 点赞

楼上的回答可以,这么好用的工具不用,

@soul ,海通证券的 app 在真机上能跑起来吗?我使用了你给的连接,下载了 app,但是使用 appium inspector 的时候,app 闪退,然后报如下的错误,不知道你有没有碰到这个问题,是怎么解决的,谢谢!我没有办法找开发拿到 debug 版,直接使用 app store 下载的版本进行测试

[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on real device with UDID 'fcaa07***'
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode7.2.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode7.2.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/xf/59cnq5sj2l54cpm99xvxnz9r0000gn/T/appium-instruments/instrumentscli0.trace -w fcaa070
******* com.htzq.htdzhiPhone -e UIASCRIPT "/Users/myht/Library/Application Support/appium/bootstrap/bootstrap-2bea48bbf643aa85.js" -e UIARESULTSPATH /var/folders/xf/59cnq5sj2l54cpm99xvxnz9r0000gn/T/appium-instruments'
[debug] [Instruments] And extra without-delay env: {}
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] <-- GET /wd/hub/status - - ms - -

[debug] [Instruments] [INST STDERR] 2017-03-08 16:18:20.436 instruments[3166:68967] WebKit Threading Violation - initial use of WebKit from a secondary thread.

[debug] [Instruments] [INST STDERR] 2017-03-08 16:18:20.752 instruments[3166:68967] Attempting to change event horizon while disengage

[debug] [Instruments] [INST STDERR] 2017-03-08 16:18:20.752 instruments[3166:68968] Attempting to change event horizon while disengage
[debug] [Instruments] [INST STDERR] Instruments Trace Error : Target failed to run: Permission to debug com.htzq.htdzhiPhone was denied. The app must be signed with a development identity (e.g. iOS Developer).

[Instruments] Error launching instruments: Instruments crashed on startup

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册