Appium 检查器总是在加载

问题描述

我正在尝试使用 Appium 桌面检查我的 iOS 应用程序。因此,我打开服务器并选择“启动检查器会话”,然后选择我的功能并启动会话。但是检查员总是在加载[1]:https://i.stack.imgur.com/AmecM.png

这是服务器日志:

[RemoteDebugger] "WIRURLKey": "file:///var/containers/Bundle/Application/3E625C3A-845C-46CB-B481-A7F55901EB76/CarsTalk-R1.app/Frameworks/SwiftR.framework/",[RemoteDebugger] "WIRPageIdentifierKey": 1 [RemoteDebugger] },[RemoteDebugger] "3": { [RemoteDebugger] "WIRPageIdentifierKey": 3,[RemoteDebugger] "WIRTitleKey": "jscontext",[RemoteDebugger] "WIRTypeKey": "WIRTypeJavaScript" [RemoteDebugger] } [RemoteDebugger] } [XCUITest] Remote debugger notified us of a new page listing: {"appIdKey":"802","pageArray":[{"id":1,"title":"","url":"file:///var/containers/Bundle/Application/3E625C3A-845C-46CB-B481-A7F55901EB76/CarsTalk-R1.app/Frameworks/SwiftR.framework/","isKey":false}]} [XCUITest] No key id found. Choosing first id from page array [XCUITest] We do not appear to have window set yet,ignoring [RemoteDebugger] Sending connection key request [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 0): 'setConnectionKey' [RemoteDebugger] Sending to Web Inspector took 4ms [RemoteDebugger] Sending connection key request [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 2): 'setConnectionKey' [RemoteDebugger] Sending to Web Inspector took 5ms [RemoteDebugger] Selecting application [RemoteDebugger] No applications currently connected. [XCUITest] No web frames found. [MJSONWP (43b20adf)] Responding to client with driver.getContexts() result: ["NATIVE_APP"] [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/contexts 200 154 ms - 86 [HTTP] [HTTP] --> GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/context [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.getCurrentContext() with args: ["43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'getCurrentContext' [MJSONWP (43b20adf)] Responding to client with driver.getCurrentContext() result: "NATIVE_APP" [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/context 200 6 ms - 84 [HTTP] [HTTP] --> GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.getSession() with args: ["43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'getSession' [WD Proxy] Matched '/' to command name 'getSession' [WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E] with no body [RemoteDebugger] Received connected automation availability state: "WIRAutomationAvailabilityNotAvailable" [RemoteDebugger] Received connected applications list: PID:803,PID:802,PID:71 [RemoteDebugger] Received connected driver list: {} [WD Proxy] Got response with status 200: {"value":{"sessionId":"586DDD81-0AE5-428A-B530-02468EB7F18E","capabilities":{"device":"iphone","browserName":"Motorna","sdkVersion":"14.1","CFBundleIdentifier":"com.machinesTalk.motorna"}},"sessionId":"586DDD81-0AE5-428A-B530-02468EB7F18E"} [WD Proxy] Proxying [GET /wda/screen] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/wda/screen] with no body [WD Proxy] Got response with status 200: {"value":{"statusBarSize":{"width":414,"height":44},"scale":3},"sessionId":"586DDD81-0AE5-428A-B530-02468EB7F18E"} [WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/window/size] with no body [WD Proxy] Got response with status 200: {"value":{"width":414,"height":896},"sessionId":"586DDD81-0AE5-428A-B530-02468EB7F18E"} [XCUITest] Merging WDA caps over Appium caps for session detail response [MJSONWP (43b20adf)] Responding to client with driver.getSession() result: {"udid":"00008020-00097D001423002E","automationName":"XCUITest","bundleId":"com.machinesTalk.motorna","deviceName":"XmaxiPhone","platformName":"iOS","platformVersion":"14.1","xcodeOrgId":"ST4BY654BM","xcodeSigningId":"iPhone Developer","newCommandTimeout":0,"connectHardwareKeyboard":true,"device":"iphone","CFBundleIdentifier":"com.machinesTalk.motorna","pixelRatio":3,"statBarHeight":44,"viewportRect":{"left":0,"top":132,"width":1242,"height":2556}} [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b 200 580 ms - 568 [HTTP] [HTTP] --> GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/window/current/size [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.getwindowSize() with args: ["current","43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'getwindowSize' [WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/window/size] with no body [WD Proxy] Got response with status 200: {"value":{"width":414,"sessionId":"586DDD81-0AE5-428A-B530-02468EB7F18E"} [MJSONWP (43b20adf)] Responding to client with driver.getwindowSize() result: {"width":414,"height":896} [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/window/current/size 200 60 ms - 98 [HTTP] [HTTP] --> POST /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/execute [HTTP] {"script":"mobile:getContexts","args":[]} [MJSONWP (43b20adf)] Calling AppiumDriver.execute() with args: ["mobile:getContexts",[],"43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'execute' [XCUITest] Getting list of available contexts [iOS] Retrieving contexts and views [XCUITest] Selecting by url: false [RemoteDebugger] Sending connection key request [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 4): 'setConnectionKey' [RemoteDebugger] Sending to Web Inspector took 4ms [RemoteDebugger] Selecting application [RemoteDebugger] Current applications available: [RemoteDebugger] Application: "PID:803" [RemoteDebugger] id: "PID:803" [RemoteDebugger] isProxy: true [RemoteDebugger] name: "com.apple.WebKit.WebContent" [RemoteDebugger] bundleId: "process-com.apple.WebKit.WebContent" [RemoteDebugger] hostId: "PID:802" [RemoteDebugger] isActive: true [RemoteDebugger] isAutomationEnabled: "UnkNown" [RemoteDebugger] Application: "PID:802" [RemoteDebugger] id: "PID:802" [RemoteDebugger] isProxy: false [RemoteDebugger] name: "Motorna" [RemoteDebugger] bundleId: "com.machinesTalk.motorna" [RemoteDebugger] hostId: undefined [RemoteDebugger] isActive: true [RemoteDebugger] isAutomationEnabled: "UnkNown" [RemoteDebugger] Checking for bundle identifiers: com.apple.WebKit.WebContent,process-com.apple.WebKit.WebContent,process-SafariViewService,com.apple.SafariViewService,*,com.machinesTalk.motorna [RemoteDebugger] Found app id key 'PID:803' for bundle 'com.apple.WebKit.WebContent' [RemoteDebugger] Found app id key 'PID:803' for bundle 'process-com.apple.WebKit.WebContent' [RemoteDebugger] Found app id key 'PID:803' for bundle 'process-SafariViewService' [RemoteDebugger] Found app id key 'PID:803' for bundle 'com.apple.SafariViewService' [RemoteDebugger] Found app id key 'PID:803' for bundle '*' [RemoteDebugger] Found app id key 'PID:802' for bundle 'com.machinesTalk.motorna' [RemoteDebugger] Found separate bundleId 'process-com.apple.WebKit.WebContent' acting as proxy for 'com.machinesTalk.motorna',with app id 'PID:803' [RemoteDebugger] Trying out the possible app ids: PID:803,PID:802 (try #1 of 20) [RemoteDebugger] Attempting app 'PID:803' [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to app 'PID:803' (id: 6): 'connectToApp' [RemoteDebugger] Received response from send (id: 6): '["PID:803",{}]' [RemoteDebugger] Sending to Web Inspector took 20ms [RemoteDebugger] Empty page dictionary received [RemoteDebugger] Error checking application: 'Empty page dictionary received'. retrying connection [RemoteDebugger] Attempting app 'PID:802' [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to app 'PID:802' (id: 8): 'connectToApp' [RemoteDebugger] Received response from send (id: 8): '["PID:802",{"1":{"WIRTitleKey":"","WIRTypeKey":"WIRTypeWebPage","WIRURLKey":"file:///var/containers/Bundle/Application/3E625C3A-845C-46CB-B481-A7F55901EB76/CarsTalk-R1.app/Frameworks/SwiftR.framewo...' [RemoteDebugger] Page changed: { [RemoteDebugger] "1": { [RemoteDebugger] "WIRTitleKey": "",[RemoteDebugger] "WIRTypeKey": "WIRTypeWebPage",[RemoteDebugger] "WIRURLKey": "file:///var/containers/Bundle/Application/3E625C3A-845C-46CB-B481-A7F55901EB76/CarsTalk-R1.app/Frameworks/SwiftR.framework/",[RemoteDebugger] "WIRPageIdentifierKey": 1 [RemoteDebugger] } [RemoteDebugger] } [XCUITest] Remote debugger notified us of a new page listing: {"appIdKey":"802",ignoring [RemoteDebugger] Sending to Web Inspector took 20ms [RemoteDebugger] Received page change notice for app 'PID:802' but the listing has not changed. Ignoring. [RemoteDebugger] Page changed: { [RemoteDebugger] "1": { [RemoteDebugger] "WIRTitleKey": "",ignoring [RemoteDebugger] Received altered app id,updating from 'null' to 'PID:802' [RemoteDebugger] Current applications available: [RemoteDebugger] Application: "PID:803" [RemoteDebugger] id: "PID:803" [RemoteDebugger] isProxy: true [RemoteDebugger] name: "com.apple.WebKit.WebContent" [RemoteDebugger] bundleId: "process-com.apple.WebKit.WebContent" [RemoteDebugger] hostId: "PID:802" [RemoteDebugger] isActive: true [RemoteDebugger] isAutomationEnabled: "UnkNown" [RemoteDebugger] Application: "PID:802" [RemoteDebugger] id: "PID:802" [RemoteDebugger] isProxy: false [RemoteDebugger] name: "Motorna" [RemoteDebugger] bundleId: "com.machinesTalk.motorna" [RemoteDebugger] hostId: undefined [RemoteDebugger] isActive: true [RemoteDebugger] isAutomationEnabled: "UnkNown" [RemoteDebugger] pageArray: [RemoteDebugger] - id: 1 [RemoteDebugger] title: "" [RemoteDebugger] url: "file:///var/containers/Bundle/Application/3E625C3A-845C-46CB-B481-A7F55901EB76/CarsTalk-R1.app/Frameworks/SwiftR.framework/" [RemoteDebugger] isKey: false [RemoteDebugger] Finally selecting app PID:802: [{"id":1,"isKey":false}] [RemoteDebugger] Selected app after 50ms [XCUITest] Found webview context after 55ms [MJSONWP (43b20adf)] Responding to client with driver.execute() result: [{"id":"NATIVE_APP"},{"id":"WEBVIEW_802.1","bundleId":"com.machinesTalk.motorna"}] [HTTP] <-- POST /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/execute 200 56 ms - 297 [HTTP] [HTTP] --> GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/source [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.getPageSource() with args: ["43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'getPageSource' [WD Proxy] Matched '/source' to command name 'getPageSource' [WD Proxy] Proxying [GET /source] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/source] with no body [WD Proxy] Got response with status 200: {"value":"\n\n \n \n \n \n \n [MJSONWP (43b20adf)] Responding to client with driver.getPageSource() result: "\n \n \n \n \n \n [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/source 200 151 ms - 3122 [HTTP] [HTTP] --> GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/screenshot [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.getScreenshot() with args: ["43b20adf-95cc-4540-82c9-14a89a80b60b"] [XCUITest] Executing command 'getScreenshot' [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unkNown error","message":"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x282b25e40","traceback":"(\n\t0 CoreFoundation 0x00000001aa7da5c0 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1185216\n\t1 libobjc.A.dylib 0x00000001be8c842c objc_exception_throw + 60\n\t2 CoreFoundation 0x00000001aa6e4a2c 52963DBA-FA89-36C2-8262-28B9776F8C12 + 178732\n\t3 CoreFoundation 0x00000001aa7dd130 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1196336\n\t4 CoreFoundation 0x00000001aa7df420 _CF_forwarding_prep_0 + 96\n\t5 WebDriverAgentLib 0x0000000102adf93c -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 156\n\t6 WebDriverAgentLib 0x0000000102adf808 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 88\n\t7 WebDriverAgentLib 0x0000000102a7f350 +[FBScreenshotCommands handleGetScreenshot:] + 1... [W3C] Matched W3C error code 'unkNown error' to UnkNownError [XCUITest] Error getting screenshot: An unkNown server-side error occurred while processing the command. Original error: -[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x282b25e40 [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unkNown error","message":"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x282b0c680","traceback":"(\n\t0 CoreFoundation 0x00000001aa7da5c0 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1185216\n\t1 libobjc.A.dylib 0x00000001be8c842c objc_exception_throw + 60\n\t2 CoreFoundation 0x00000001aa6e4a2c 52963DBA-FA89-36C2-8262-28B9776F8C12 + 178732\n\t3 CoreFoundation 0x00000001aa7dd130 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1196336\n\t4 CoreFoundation 0x00000001aa7df420 _CF_forwarding_prep_0 + 96\n\t5 WebDriverAgentLib 0x0000000102adf93c -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 156\n\t6 WebDriverAgentLib 0x0000000102adf808 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 88\n\t7 WebDriverAgentLib 0x0000000102a7f350 +[FBScreenshotCommands handleGetScreenshot:] + 1... [W3C] Matched W3C error code 'unkNown error' to UnkNownError [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unkNown error","message":"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x282b00480","traceback":"(\n\t0 CoreFoundation 0x00000001aa7da5c0 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1185216\n\t1 libobjc.A.dylib 0x00000001be8c842c objc_exception_throw + 60\n\t2 CoreFoundation 0x00000001aa6e4a2c 52963DBA-FA89-36C2-8262-28B9776F8C12 + 178732\n\t3 CoreFoundation 0x00000001aa7dd130 52963DBA-FA89-36C2-8262-28B9776F8C12 + 1196336\n\t4 CoreFoundation 0x00000001aa7df420 _CF_forwarding_prep_0 + 96\n\t5 WebDriverAgentLib 0x0000000102adf93c -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 156\n\t6 WebDriverAgentLib 0x0000000102adf808 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 88\n\t7 WebDriverAgentLib 0x0000000102a7f350 +[FBScreenshotCommands handleGetScreenshot:] + 1... [W3C] Matched W3C error code 'unkNown error' to UnkNownError [MJSONWP (43b20adf)] Encountered internal error running command: UnkNownError: An unkNown server-side error occurred while processing the command. Original error: -[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x282b00480 [MJSONWP (43b20adf)] at errorFromW3CJsonCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25) [MJSONWP (43b20adf)] at ProxyRequestError.getActualError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:663:14) [MJSONWP (43b20adf)] at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:273:19) [MJSONWP (43b20adf)] at runMicrotasks () [MJSONWP (43b20adf)] at processticksAndRejections (internal/process/task_queues.js:85:5) [HTTP] <-- GET /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b/screenshot 500 1069 ms - 273 [HTTP] [WebDriverAgent] Parsed BUILD_DIR configuration value: '/Users/macbookair/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products' [WebDriverAgent] Got derived data root: '/Users/macbookair/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp' [RemoteDebugger] We were notified we might have connected to the wrong app. Using id PID:805 instead of PID:802 [RemoteDebugger] We were notified we might have connected to the wrong app. Using id PID:805 instead of PID:802 [RemoteDebugger] Notified that new application 'PID:805' has connected [RemoteDebugger] Notified that new application 'PID:805' has connected [RemoteDebugger] Page changed: { [RemoteDebugger] "1": { [RemoteDebugger] "WIRTitleKey": "",[RemoteDebugger] "4": { [RemoteDebugger] "WIRTitleKey": "",[RemoteDebugger] "WIRPageIdentifierKey": 4 [RemoteDebugger] },[RemoteDebugger] "5": { [RemoteDebugger] "WIRPageIdentifierKey": 5,"isKey":false},{"id":4,ignoring [RemoteDebugger] Page changed: { [RemoteDebugger] "1": { [RemoteDebugger] "WIRTitleKey": "",ignoring [RemoteDebugger] Notified that new application 'PID:807' has connected [RemoteDebugger] Notified that new application 'PID:807' has connected [RemoteDebugger] Page changed: { [RemoteDebugger] "1": { [RemoteDebugger] "WIRTitleKey": "",[RemoteDebugger] "6": { [RemoteDebugger] "WIRTitleKey": "",[RemoteDebugger] "WIRPageIdentifierKey": 6 [RemoteDebugger] },[RemoteDebugger] "7": { [RemoteDebugger] "WIRPageIdentifierKey": 7,{"id":6,ignoring [HTTP] --> DELETE /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b [HTTP] {} [MJSONWP (43b20adf)] Calling AppiumDriver.deleteSession() with args: ["43b20adf-95cc-4540-82c9-14a89a80b60b"] [BaseDriver] Event 'quitSessionRequested' logged at 1620779743495 (02:35:43 GMT+0200 (heure d’été d’Europe centrale)) [Appium] Removing session 43b20adf-95cc-4540-82c9-14a89a80b60b from our master session list [WD Proxy] Matched '/session/43b20adf-95cc-4540-82c9-14a89a80b60b' to command name 'deleteSession' [WD Proxy] Proxying [DELETE /session/43b20adf-95cc-4540-82c9-14a89a80b60b] to [DELETE http://127.0.0.1:8100/session/586DDD81-0AE5-428A-B530-02468EB7F18E] with no body [RemoteDebugger] Application 'PID:802' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'PID:802' [RemoteDebugger] No longer have app id. Attempting to find new one. [RemoteDebugger] Application 'PID:807' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [RemoteDebugger] Application 'PID:803' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [RemoteDebugger] Application 'PID:805' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [RemoteDebugger] Application 'PID:802' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'PID:802' [RemoteDebugger] No longer have app id. Attempting to find new one. [RemoteDebugger] Application 'PID:807' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [RemoteDebugger] Application 'PID:803' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [RemoteDebugger] Application 'PID:805' disconnected. Removing from app dictionary. [RemoteDebugger] Current app is 'undefined' [WD Proxy] Got response with status 200: {"value":null,"sessionId":null} [DevCon Factory] Releasing connections for 00008020-00097D001423002E device on any port number [DevCon Factory] Found cached connections to release: ["00008020-00097D001423002E:8100"] [DevCon Factory] Releasing the listener for '00008020-00097D001423002E:8100' [iProxy@00008020:8100] Closing the connection [DevCon Factory] Cached connections count: 0 [XCUITest] Not clearing log files. Use clearSystemFilescapability to turn on. [XCUITest] Found a remote debugger session. Removing... [RemoteDebugger] disconnecting from remote debugger [RemoteDebugger] Cleaning up listeners [BaseDriver] Event 'quitSessionFinished' logged at 1620779744527 (02:35:44 GMT+0200 (heure d’été d’Europe centrale)) [MJSONWP (43b20adf)] Received response: null [MJSONWP (43b20adf)] But deleting session,so not returning [MJSONWP (43b20adf)] Responding to client with driver.deleteSession() result: null [HTTP] <-- DELETE /wd/hub/session/43b20adf-95cc-4540-82c9-14a89a80b60b 200 1033 ms - 76 [HTTP]

有什么想法吗?

解决方法

马赫!欢迎使用 StackOverflow。

当我将功能从 WebDriverIO 配置复制到检查器并且应用程序在我的设备上启动但从未在检查器中加载时,我遇到了与您类似的问题。

enter image description here

Appium 日志表明未实施“方法”。 Appium 使用平台特定的自动化驱动程序之一包装 Flutter 驱动程序,它需要知道在检查器中使用哪个包装器,否则无法与应用程序交互。它需要执行此操作以调用 getPageSource(),这是仍在加载的部分中显示的内容。

我在 Android 设备上进行测试,因此我将“automationName”字段更改为“UiAutomator2”并且它对我有用。对于 iOS,您可以尝试“XCUITest”或“Ins​​truments”。

请参阅 device capabilities docs page 以获取对此和可用自动化名称的引用。

还有一点需要注意的是,Appium 需要设置以下环境变量,否则将无法正常运行:

  • JAVA_HOME
  • ANDROID_HOME

这是配置和使用 Appium 的不错参考:Clarabez's Appium Course (in English)

否则,检查 Appium 服务器日志本身是否有错误或异常。您可以像我的屏幕截图一样在窗口中查看它们,或者将它们记录到文件中以供查看。