1.有看到关于这个问题的解释 (https://testerhome.com/topics/16353) ,原因是 Xcode 版本太高,这是 appium 的一个 bug ,但是 1.12.1 已解决这个 bug,但是我的 appium desktop 版本是 1.2.0-beta.1,应该也是没有这个 bug 的?
2.新增问题:
下载完 Carthage,并且 clone 了 Webagentdriver 后,执行:sh .Script/bootstrap.sh,却出现了以下错误,这是什么原因?
dyld: Symbol not found: _$s11SubSequenceSlTl Referenced from: /usr/local/bin/carthage Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib in /usr/local/bin/carthage ./Scripts/bootstrap.sh: line 45: 11664 Abort trap: 6 carthage bootstrap $USE_SSH
我有搜过,但是没有搜到和我的错误,另外,将 bootstrap.sh 代码中的!删掉就没事了。
if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then
carthage bootstrap $USE_SSH
cp Cartfile.resolved Carthage
fi
但是后续编译问题很多,比如 “'RoutingHTTPServer/RoutingConnection.h' file not found” 等等,网上都说是 Carthage 没下载,但是我下载了。
已解决,这个是 mac 10.14 的坑,下载并安装 “Download Swift 5 Runtime Support for Command Line Tools” 即可
WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.apple.test.WebDriverAgentRunner-Runner. (Underlying error: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.apple.test.WebDriverAgentRunner-Runner')))
如果 pycharm 运行 driver.remote 会出错
E *** If you believe this error represents a bug, please attach the result bundle at /Users/gingerbread_man/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.18_00-28-28--0700.xcresult
E 2021-05-18 00:28:28.888 xcodebuild[16053:181868] [MT] IDETestOperationsObserverDebug: 0.081 elapsed -- Testing started completed.
E 2021-05-18 00:28:28.890 xcodebuild[16053:181868] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
E 2021-05-18 00:28:28.890 xcodebuild[16053:181868] [MT] IDETestOperationsObserverDebug: 0.081 sec, +0.081 sec -- end
E 2021-05-18 00:28:28.893 xcodebuild[16053:181868] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/gingerbread_man/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f97868eb150 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
E 2021-05-18 00:28:28.895 xcodebuild[16053:181868] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "Failed to install or launch the test runner" UserInfo={NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /Users/gingerbread_man/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.18_00-28-28--0700.xcresult, NSLocalizedDescription=Failed to install or launch the test runner, NSUnderlyingError=0x7f97868ccbf0 {Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/gingerbread_man/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f97868eb150 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
E Testing failed:
E Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor. (in target 'WebDriverAgentRunner')
E The test runner encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))
E ** TEST EXECUTE FAILED **
E Testing started on 'iPhone'. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException
我用 xcode 执行 test 之后变成了这个 bug
iPhone has denied the launch request.
iPhone 上面已经有 webdriveragentrunner app 安装了,但是好像无法启动?
请求大家帮帮忙,我弄了很久没解决。