千辛万苦,连哄带骗,向领导申请了 3 台 Mac 二手机器,来搞 IOS 自动化。安装单独执行都没问题,集成起来问题来了。有两台机器的 WDA 端口一直监听在 8100 上,集成多开无法搞定!
机器上修改 WDA 源码,设置固定端口 8200,编译后,WDA 确实可以监听 8200,但是我 java 里如下设置后,appium 启动后 WDA 依然还是会自动编译。
capabilities.setCapability("useNewWDA", false);//不重新装 WDA
capabilities.setCapability("wdaLocalPort", 8200);//监听 8200
各位有没有办法 让 WDA 不编译或者指定端口啊
Build settings from command line:
USE_PORT = 8300
2018-08-30 15:22:49.714 xcodebuild[25252:7963294] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/var/folders/g6/8792kvn52hv52d169m85lyhr0000gp/T/com.apple.dt.XCTest/IDETestRunSession-EF7C3AED-F06E-41CC-AD43-3D4F1F867756/WebDriverAgentRunner-827F85BB-7037-4E7A-8744-2F9B84F74B54/Session-WebDriverAgentRunner-2018-08-30_152249-JIOZi8.log
2018-08-30 15:22:49.714 xcodebuild[25252:7963275] [MT] IDETestOperationsObserverDebug: (5868CF73-5DF8-42DB-8EC1-CCC53202314F) Beginning test session WebDriverAgentRunner-5868CF73-5DF8-42DB-8EC1-CCC53202314F at 2018-08-30 15:22:49.714 with Xcode 9F2000 on target <DVTiPhoneSimulator: 0x7f997f217b00> {
SimDevice: iPhone X (E51A02EC-52B9-424A-8610-42A5E06BBD30, iOS 11.4, Booted)
} (11.4 (15F79))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
2018-08-30 15:22:50.994175+0800 WebDriverAgentRunner-Runner[25270:7963614] +[CATransaction synchronize] called within transaction
2018-08-30 15:22:51.053773+0800 WebDriverAgentRunner-Runner[25270:7963614] Running tests...
objc[25270]: Class VCWeakObjectHolder is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/Frameworks/ViceroyTrace.framework/ViceroyTrace (0x1243184d0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/AVConference (0x122f16e38). One of the two will be used. Which one is undefined.
2018-08-30 15:22:51.444877+0800 WebDriverAgentRunner-Runner[25270:7963614] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2018-08-30 15:22:52.194
Test Suite 'WebDriverAgentLib.framework' started at 2018-08-30 15:22:52.194
Test Suite 'WebDriverAgentLib.framework' passed at 2018-08-30 15:22:52.194.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'WebDriverAgentRunner.xctest' started at 2018-08-30 15:22:52.195
Test Suite 'UITestingUITests' started at 2018-08-30 15:22:52.195
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2018-08-30 15:22:52.195
t = 0.00s Set Up
2018-08-30 15:22:52.197300+0800 WebDriverAgentRunner-Runner[25270:7963614] Built at Aug 30 2018 15:19:28
2018-08-30 15:22:52.217590+0800 WebDriverAgentRunner-Runner[25270:7963614] ServerURLHere->http://10.112.4.135:8100<-ServerURLHere
可以看到 设置 8300 时,编译后 端口仍然是 8200,脑壳疼,各位有么有解决方案啊。先拜谢各位了!