问题:
当我尝试在服务器屏幕上使用appium inspector检查元素时,我遇到了WDA超时错误,并且对于大屏幕我也遇到了一些错误。但是加载大屏幕(其中包含很多数据)有时会起作用。对于小屏幕,效果很好
环境:
出现该问题的Appium版本(或git修订版):appium版本1.9.1 测试中的移动平台/版本:iOS 11.4.1 真实设备或模拟器/模拟器:真实设备 Xcode:9.4
所需功能为:
{ “ platformName”:“ iOS”, “ deviceName”:“ ipad Air”, “ udid”:“ a451bdb8bbc400788dc63bd56f4fe24f99642d0f”, “ bundleId”:“ ie.eida.iphoneapp.EIDA-iphone”, “ automationName”:“ XCUITest”, “ noReset”:是的, “ platformVersion”:“ 11.4.1”, “ showXcodeLog”:是 }
链接到Appium日志:
服务器正在运行
[Appium] Welcome to Appium v1.9.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[GENERIC] Calling AppiumDriver.getSessions() with args: []
[GENERIC] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 7 ms - 40
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"automationName":"XCUITest","bundleId":"ie.eida.iphoneapp.EIDA-iphone","deviceName":"ipad Air","noReset":true,"platformName":"iOS","platformVersion":"11.4.1","showXcodeLog":true,"udid":"a451bdb8bbc400788dc63bd56f4fe24f99642d0f","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"XCUITest","bundleId":"ie.eida.iphoneapp.EIDA-iphone","deviceName":"ipad Air","noReset":true,"platformName":"iOS","platformVersion":"11.4.1","showXcodeLog":true,"udid":"a451bdb8bbc400788dc63bd56f4fe24f99642d0f","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1539861024230 (12:10:24 GMT+0100 (IST))
[Appium] Creating new XCUITestDriver (v2.94.2) session
[Appium] Capabilities:
[Appium] automationName: XCUITest
[Appium] bundleId: ie.eida.iphoneapp.EIDA-iphone
[Appium] deviceName: ipad Air
[Appium] noReset: true
[Appium] platformName: iOS
[Appium] platformVersion: 11.4.1
[Appium] showXcodeLog: true
[Appium] udid: a451bdb8bbc400788dc63bd56f4fe24f99642d0f
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Creating session with MJSONWP desired capabilities: {"automationName":"XCUITest...
[BaseDriver] Session created with session id: 163dfa1f-5a8a-4a76-a9b6-00fa016dea76
[XCUITest] Current user: 'vamsi'
[XCUITest] Xcode version set to '9.4' (tools v10.0.0.0.1.1535735448)
[XCUITest] iOS SDK Version set to '11.4'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1539861024939 (12:10:24 GMT+0100 (IST))
[XCUITest] Available devices: a451bdb8bbc400788dc63bd56f4fe24f99642d0f
[XCUITest] Creating iDevice object with udid 'a451bdb8bbc400788dc63bd56f4fe24f99642d0f'
[XCUITest] Determining device to run tests on: udid: 'a451bdb8bbc400788dc63bd56f4fe24f99642d0f', real device: true
[BaseDriver] Event 'appConfigured' logged at 1539861025406 (12:10:25 GMT+0100 (IST))
[BaseDriver] Event 'resetStarted' logged at 1539861025406 (12:10:25 GMT+0100 (IST))
[XCUITest] Reset: fullReset not set. Leaving as is
[BaseDriver] Event 'resetComplete' logged at 1539861025407 (12:10:25 GMT+0100 (IST))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[XCUITest] Crash reports root '/Users/vamsi/Library/Logs/CrashReporter/MobileDevice/iPad Air' does not exist. Got nothing to gather.
[BaseDriver] Event 'logCaptureStarted' logged at 1539861025756 (12:10:25 GMT+0100 (IST))
[XCUITest] Setting up real device
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Matched '/status' to command name 'getStatus'
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "11.4.1",\n "sdkVersion" : "11.3"\n },\n "ios" : {\n "simulatorVersion" : "11.4.1",\n "ip" : "192.168.1.39"\n },\n "build" : {\n "upgradedAt" : "1539857934000",\n "time" : "Oct 18 2018 11:19:29",\n "productBundleIdentifier" : "com.facebook.WebDriverAgentRunner"\n }\n },\n "sessionId" : "CB7A11DC-2179-466B-86D7-28FE535CA8F0",\n "status" : 0\n}"
[XCUITest] Upgrade timestamp of the currently bundled WDA: 1539857934000
[XCUITest] Upgrade timestamp of the WDA on the device: 1539857934000
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/' with 'com.facebook.WebDriverAgentRunner'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval
[BaseDriver] Event 'wdaStartAttempted' logged at 1539861026253 (12:10:26 GMT+0100 (IST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[BaseDriver] Event 'wdaSessionAttempted' logged at 1539861026254 (12:10:26 GMT+0100 (IST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Matched '/status' to command name 'getStatus'
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "11.4.1",\n "sdkVersion" : "11.3"\n },\n "ios" : {\n "simulatorVersion" : "11.4.1",\n "ip" : "192.168.1.39"\n },\n "build" : {\n "upgradedAt" : "1539857934000",\n "time" : "Oct 18 2018 11:19:29",\n "productBundleIdentifier" : "com.facebook.WebDriverAgentRunner"\n }\n },\n "sessionId" : "CB7A11DC-2179-466B-86D7-28FE535CA8F0",\n "status" : 0\n}"
[JSONWP Proxy] Matched '/session' to command name 'createSession'
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"ie.eida.iphoneapp.EIDA-iphone","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"CC3CB600-CBAC-4A46-B9D4-D8A67265BE40","capabilities":{"device":"ipad","browserName":"EIDA App","sdkVersion":"11.4.1","CFBundleIdentifier":"ie.eida.iphoneapp.EIDA-iphone"}},"sessionId":"CC3CB600-CBAC-4A46-B9D4-D8A67265BE40","status":0}
[BaseDriver] Event 'wdaSessionStarted' logged at 1539861032264 (12:10:32 GMT+0100 (IST))
[BaseDriver] Event 'wdaStarted' logged at 1539861032264 (12:10:32 GMT+0100 (IST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[BaseDriver] Event 'orientationSet' logged at 1539861032265 (12:10:32 GMT+0100 (IST))
[Appium] New XCUITestDriver session created successfully, session 163dfa1f-5a8a-4a76-a9b6-00fa016dea76 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1539861032266 (12:10:32 GMT+0100 (IST))
[MJSONWP] Cached the protocol value 'MJSONWP' for the new session 163dfa1f-5a8a-4a76-a9b6-00fa016dea76
[MJSONWP] Responding to client with driver.createSession() result: {"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"automationName":"XCUITest","bundleId":"ie.eida.iphoneapp.EIDA-iphone","deviceName":"ipad Air","noReset":true,"platformName":"iOS","platformVersion":"11.4.1","showXcodeLog":true,"udid":"a451bdb8bbc400788dc63bd56f4fe24f99642d0f","newCommandTimeout":0,"connectHardwareKeyboard":true}
[HTTP] <-- POST /wd/hub/session 200 8040 ms - 550
[HTTP]
[HTTP] --> POST /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/context
[HTTP] {"name":"NATIVE_APP"}
[MJSONWP] Calling AppiumDriver.setContext() with args: ["NATIVE_APP","163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'setContext'
[iOS] Attempting to set context to 'NATIVE_APP'
[MJSONWP] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/context 200 5 ms - 76
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/source
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getPageSource'
[JSONWP Proxy] Matched '/source' to command name 'getPageSource'
[JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/source] with no body
[JSONWP Proxy] Got response with status 200: "{\n "value" : "\n\n \n \n \n
[MJSONWP] Responding to client with driver.getPageSource() result: "\n \n \n \n \n \n
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/source 200 3518 ms - 11499
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/screenshot
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getScreenshot() with args: ["163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getScreenshot'
[XCUITest] Taking screenshot with WDA
[JSONWP Proxy] Matched '/screenshot' to command name 'getScreenshot'
[JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/screenshot] with no body
[JSONWP Proxy] Got response with status 200: "{\n "value" : "iVBORw0KGgoAAAANSUhEUgAABgAAAAgACAIAAABvs29hAAAAAXNSR0IArs4c6QAA\r\nABxpRE9UAAAAAgAAAAAAAAQAAAAAKAAABAAAAAQAAAex2jxIMMkAAEAASURBVHgB\r\n7L13nB3FlfbfSiQhCSFEzghJCI0m5ztzJ+cclEECgUgmJ5OMpJm5qW\/fMCMJm+Dw\r\n2otxXrNee41xAExGgCQ00uScg0YC7+773+97qkeCNWu\/yOxvbePyp9yfO\/d2V1Wf\r\nblFPPec55xiT7pRJd9KEN27MFztqRg75owf9cX1WSq\/f2e3P6TVz+sycQZ9zxJc6\r\n5o2b8MZOmCvGzMhRb9KIN23UmzLmSZlypY550rqtzC4rs9+fOupLGPNF00Z8KUO+\r\ntBFf0gm1QTNFtdQhM4ULGfGIJ2LSG93nT+uysvv8zkEzjRP4yZ4PU+3305KGzKQh\r\nf9yIOd1GfXF24zRujX7ohDbliaVxvxOehDFvAvNnntwdU\/1E489UvqSNmrH0M2Qm\r\nMB81UOqgaf\/KBMRuk564KXeCaklT7hO72ROyjD5ZW0BbQFtAW0Bb4B\/HAgoGpLBS\r\nT3pYZOOOuBJoU66UCXfqqAd0ITiBdR\/cMmKtHLFWAABYrPv8qQAGGxsM+hMG\/Ul9\r\nVhLLNz8pfBILKuBClvLpX\/1p\/WYaEIK1fsIXMeGL5DQwQK8\/UzUnv4ITADyDvuwR\r\nr1OQg\/SQxOWjZrQCTrGAkK6AE+AknXjjBCMJhNCQQFtAW0BbQFtAW+DvzwLH1lCZ\r\nOSsa+2XVZPG1119ZFn0sgrGy6zcje80ClkgW6yPuODbIsARqwy48gCyprJhmSq+V\r\nxgLNSq1YAunZ\/l52977MMXfmqMfZHUjqCiX0W2znZSE+vjfvNzP5LPt3bxyLMpe...
[MJSONWP] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABgAAAAgACAIAAABvs29hAAAAAXNSR0IArs4c6QAA\r\nABxpRE9UAAAAAgAAAAAAAAQAAAAAKAAABAAAAAQAAAex2jxIMMkAAEAASURBVHgB\r\n7L13nB3FlfbfSiQhCSFEzghJCI0m5ztzJ+cclEECgUgmJ5OMpJm5qW/fMCMJm+Dw\r\n2otxXrNee41xAExGgCQ00uScg0YC7+773+97qkeCNWu/yOxvbePyp9yfO/d2V1Wf\r\nblFPPec55xiT7pRJd9KEN27MFztqRg75owf9cX1WSq/f2e3P6TVz+sycQZ9zxJc6\r\n5o2b8MZOmCvGzMhRb9KIN23UmzLmSZlypY550rqtzC4rs9+fOupLGPNF00Z8KUO+\r\ntBFf0gm1QTNFtdQhM4ULGfGIJ2LSG93nT+uysvv8zkEzjRP4yZ4PU+3305KGzKQh\r\nf9yIOd1GfXF24zRujX7ohDbliaVxvxOehDFvAvNnntwdU/1E489UvqSNmrH0M2Qm\r\nMB81UOqgaf/KBMRuk564KXeCaklT7hO72ROyjD5ZW0BbQFtAW0Bb4B/HAgoGpLBS\r\nT3pYZOOOuBJoU66UCXfqqAd0ITiBdR/cMmKtHLFWAABYrPv8qQAGGxsM+hMG/Ul9\r\nVhLLNz8pfBILKuBClvLpX/1p/WYaEIK1fsIXMeGL5DQwQK8/UzUnv4ITADyDvuwR\r\nr1OQg/SQxOWjZrQCTrGAkK6AE+AknXjjBCMJhNCQQFtAW0BbQFtAW+DvzwLH1lCZ\r\nOSsa+2XVZPG1119ZFn0sgrGy6zcje80ClkgW6yPuODbIsARqwy48gCyprJhmSq+V\r\nxgLNSq1YAunZ/l52977MMXfmqMfZHUjqCiX0W2znZSE+vjfvNzP5LPt3bxyLMpew\r\n0AshYCbQD/zDsZVatudqh85an8DCPeqFmlAMxrG9PzPnfOnBzITiYHqwBP93R8JH\r\n...
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/screenshot 200 478 ms - 1111038
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/window/current/size
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getWindowSize() with args: ["current","163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getWindowSize'
[JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/window/size] with no body
[JSONWP Proxy] Got response with status 200: "{\n "value" : {\n "width" : 768,\n "height" : 1024\n },\n "sessionId" : "CC3CB600-CBAC-4A46-B9D4-D8A67265BE40",\n "status" : 0\n}"
[MJSONWP] Responding to client with driver.getWindowSize() result: {"width":768,"height":1024}
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/window/current/size 200 222 ms - 99
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/source
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getPageSource'
[JSONWP Proxy] Matched '/source' to command name 'getPageSource'
[JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/source] with no body
[MJSONWP] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
[MJSONWP] at JWProxy.command$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:238:13)
[MJSONWP] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/source 500 49 ms - 271
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/screenshot
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getScreenshot() with args: ["163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getScreenshot'
[XCUITest] Taking screenshot with WDA
[JSONWP Proxy] Matched '/screenshot' to command name 'getScreenshot'
[JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/screenshot] with no body
[XCUITest] Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
[XCUITest] Taking screenshot with 'idevicescreenshot'
[JSONWP Proxy] Matched '/orientation' to command name 'getOrientation'
[JSONWP Proxy] Proxying [GET /orientation] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/orientation] with no body
[XCUITest] Error getting screenshot through 'idevicescreenshot': An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
[XCUITest] Taking screenshot with WDA
[JSONWP Proxy] Matched '/screenshot' to command name 'getScreenshot'
[JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/screenshot] with no body
[XCUITest] Taking screenshot with WDA
[JSONWP Proxy] Matched '/screenshot' to command name 'getScreenshot'
[JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/CC3CB600-CBAC-4A46-B9D4-D8A67265BE40/screenshot] with no body
[MJSONWP] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
[MJSONWP] at JWProxy.command$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:238:13)
[MJSONWP] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/screenshot 500 1048 ms - 271
[HTTP]
[HTTP] --> GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/window/current/size
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getWindowSize() with args: ["current","163dfa1f-5a8a-4a76-a9b6-00fa016dea76"]
[XCUITest] Executing command 'getWindowSize'
[MJSONWP] Responding to client with driver.getWindowSize() result: {"width":768,"height":1024}
[HTTP] <-- GET /wd/hub/session/163dfa1f-5a8a-4a76-a9b6-00fa016dea76/window/current/size 200 2 ms - 99
[HTTP]