Appium 求助:macOS 升级到 Big Sur11.3.1,Xcode 升级到 12.5,Appium desktop 可以启动应用,但是无法获取应用元素数据了

轩天 · 2021年05月10日 · 最后由 sun12311nidllpo1 回复于 2022年11月24日 · 3385 次阅读

报错如下:
[debug] [35m[XCUITest][39m Executing command 'getScreenshot'
[debug] [35m[XCUITest][39m Taking screenshot with WDA
[debug] [35m[WD Proxy][39m Matched '/screenshot' to command name 'getScreenshot'
[debug] [35m[WD Proxy][39m Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/5D936929-EC7E-422A-8D2C-675E26FA2CF7/screenshot] with no body
[info] [35m[WD Proxy][39m Got response with status 500: {"value":{"error":"unknown error","message":"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x2835d8840","traceback":"(\n\t0 CoreFoundation 0x00000001b1d1e5c0 472C9193-115D-34CD-AD1D-0E7E091C9432 + 1185216\n\t1 libobjc.A.dylib 0x00000001c5d9842c objc_exception_throw + 60\n\t2 CoreFoundation 0x00000001b1c28a2c 472C9193-115D-34CD-AD1D-0E7E091C9432 + 178732\n\t3 CoreFoundation 0x00000001b1d21130 472C9193-115D-34CD-AD1D-0E7E091C9432 + 1196336\n\t4 CoreFoundation 0x00000001b1d23420 _CF_forwarding_prep_0 + 96\n\t5 WebDriverAgentLib 0x000000010770b944 -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 156\n\t6 WebDriverAgentLib 0x000000010770b810 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 88\n\t7 WebDriverAgentLib 0x00000001076ab358 +[FBScreenshotCommands handleGetScreenshot:] + 1...
[debug] [35m[W3C][39m Matched W3C error code 'unknown error' to UnknownError
[warn] [35m[XCUITest][39m Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: -[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x2835d8840

共收到 3 条回复 时间 点赞

Appium 更新到 1.21.0 即可

kukaka 回复

嗯,升级后就可以了,多谢

大佬,ios 自动化想请教你,可以加我 qq 吗,475312577。感谢

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