Appium创建驱动程序的速度非常慢。 (检查器非常缓慢地加载元素树。)

时间:2018-06-29 07:47:41

标签: webdriver appium-ios

问题

当我使用Appium桌面为检查器创建会话时,可以快速启动该应用程序,但是为检查器加载元素树花费的时间太长。此现象仅在某些应用程序中发生。

环境

  • 出现问题的Appium版本(或git版本):Appium Desktop 1.6.1(Appium Server 1.8.0)
  • 未显示该问题的最新Appium版本(如果适用):
  • 用于运行Appium:MacOS 10.13.5的桌面OS /版本
  • Node.js版本(除非使用Appium.app | exe):10.1.0
  • 正在测试的移动平台/版本:iOS 10.3.3
  • 真实设备或模拟器/模拟器:iPhone 7真实设备
  • Appium CLI或Appium.app | exe:

详细信息

大约需要5分钟才能加载元素树。

2018-06-28 09:40:05:339 - [debug] [XCUITest] Failed to create WDA session. Retrying...
2018-06-28 09:40:06:346 - [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1530150006346 (09:40:06 GMT+0800 (CST))
2018-06-28 09:40:06:346 - [debug] [XCUITest] Sending createSession command to WDA
2018-06-28 09:40:06:347 - [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com    .chinaums.ttf6","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":true,"maxTypingFrequency":60,"shouldUseS    ingletonTestManager":true}}
2018-06-28 09:45:28:282 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"9A6749D7-5A1D-431F-AA57-  E1126F189E95","capabilities":{"device":"iphone","browserName":null,"sdkVersion":"10.3.3","CFBundleIdentifier":null}},"sessionId":"9A6749D7-5A1D-431F-AA57-  E1126F189E95","status":0}
2018-06-28 09:45:28:282 - [debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1530150328282 (09:45:28 GMT+0800 (CST))
2018-06-28 09:45:28:472 - [debug] [XCUITest] Cannot find a match for DerivedData folder path from lsof. Trying to access logs
2018-06-28 09:45:28:482 - [debug] [BaseDriver] Event 'wdaStarted' logged at 1530150328481 (09:45:28 GMT+0800 (CST))
2018-06-28 09:45:28:482 - [XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if  this is an undesired behavior.  

链接到Appium日志

appium_server_log

1 个答案:

答案 0 :(得分:0)

在引用Creating session takes over 5 minutes now with Xcode 9之后,我对其进行了修改。 只需添加功能:waitForQuiescence = false