苹果是相对于起点。。。
原来这个 moveTo 用在安卓和苹果的效果不一样。。。尴尬了。。。还得写个 if
卧槽,还真是。我记得我最早一开始用的是相对屏幕的位置,后来不知道啥时候出错了。然后改成了相对于起点的位置。这是又改回去了么??? 不管怎样非常感谢!🙏
又试了很多次,发现只有在我使用 .press(x,y) 的时候才会这样,用 .press(element) 代替坐标就不会出现 exception,在安卓手机和平板上试过都是这样,真是十分奇怪。
需要的话我回头简历发你,不过我人在德国。面试的话只能视频面试
德语比英语好的要伐。德国工作了 8 年了,最近正想回国发展
软件已经安装了,删了再试试
好像是这么回事,看 log 里面说 swift3.1 编译过的不能导到 3.0.2 里。而只有 xcode8.3 以后才有 swift3.1。谢谢啦
给 XCTestWD.xcodeproj 选了 development team 以后出现如下错误
server.js:16:12 [master] pid:8827 server start with config:
{ port: 5678,
verbose: true,
udid: '92152c9745d203e067835a0a82dec73ce27124f7',
ip: '10.42.32.117',
host: 'spryMBP.local',
loaded_time: '2017-05-11 16:56:38' }
app-inspector.js:43:12 [master] pid:8827 server start at: http://10.42.32.117:5678
xctest-client.js:63:14 [master] pid:8827 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client start with port: 8001
xctest-client.js:243:14 [master] pid:8827 xcode version: 8.2.1
XCTestWD version: 1.0.7
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:39.493 xcodebuild[8833:220352] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.logxctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:39.493 xcodebuild[8833:220344] [MT] IDETestOperationsObserverDebug: (1F2F7841-42C8-4EDB-ABC4-ACAFB4A8BF09) Beginning test session XCTestWDUITests-1F2F7841-42C8-4EDB-ABC4-ACAFB4A8BF09 at 2017-05-11 16:56:39.493 with Xcode 8C1002 on target {
deviceSerialNumber: C39QKKFNGRWF
identifier: 92152c9745d203e067835a0a82dec73ce27124f7
deviceClass: iPhone
deviceName: sp_iPhone6S Plus_s2
deviceIdentifier: 92152c9745d203e067835a0a82dec73ce27124f7
productVersion: 10.2.1
buildVersion: 14D27
deviceSoftwareVersion: 10.2.1 (14D27)
deviceArchitecture: arm64
deviceTotalCapacity: 11747463168
deviceAvailableCapacity: 2083426304
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType:
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (10.2.1 (14D27))xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:40.574 xcodebuild[8833:220344] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.log}xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827
Testing failed:xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 Module compiled with Swift 3.1 cannot be imported in Swift 3.0.2: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/../Carthage/Build/iOS/Swifter.framework/Modules/Swifter.swiftmodule/arm64.swiftmodule
** TEST FAILED **
The following build commands failed:
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/XCTestWDStatus.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDStatusController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDKeysController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDWindowController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/XCTestWDAlert.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDScreenshotController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/extensions/XCTestWDApplicationTree.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/XCTestWDServer.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(9 failures)
xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:279:14 [master] pid:8827 killing deviceLogProc pid: 8830
xctest-client.js:284:14 [master] pid:8827 killing runnerProc pid: 8833
xctest-client.js:290:14 [master] pid:8827 killing iproxyProc pid: 8832
xctest-client.js:202:14 [master] pid:8827 xctest client exit with code: 65, signal: null
xctest-client.js:157:16 [master] pid:8827 deviceconsole exit with code: null, signal: SIGKILL
xctest-client.js:271:14 [master] pid:8827 Fail to start xctest: undefined
undefined
iOS device started: 92152c9745d203e067835a0a82dec73ce27124f7
inspector start at: http://10.42.32.117:5678
xctest-client.js:230:14 [master] pid:8827 iproxy exit with code: null, signal: SIGKILL
<-- GET /
helper.js:97:16 [master] pid:8827 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
Error: connect ECONNREFUSED 127.0.0.1:8001
at Object.exports._errnoException (util.js:1008:11)
at exports._exceptionWithHostPort (util.js:1031:20)
at TCPConnectWrap.afterConnect as oncomplete
而链接 ios 模拟器的话,虽然 client 启动了,但是既不会打开 inspector,也没有报错,不知道什么情况。。。