org.openqa.selenium.WebDriverException: java.io.IOException - PullRequest
2 голосов
/ 24 мая 2019

Сбой теста в ферме устройств AWS (для iOS) после запуска нескольких сценариев с

org.openqa.selenium.WebDriverException: java.io.IOException: неожиданное завершение потока в соединении {127.0.0.1: 4723, proxy = DIRECT hostAddress = / 127.0.0.1: 4723 cipherSuite = нет протокол = http / 1.1}

Версия Selenium-java - 3.141.59.

Когда я запускаю свой скрипт на локальном компьютере с платформой версии 12.1 и именем устройства является iPhone 6 plus, он работает без сбоев.Но происходит сбой на ферме устройств с любым устройством и версией (я проверил несколько, iPhone 7, версия 11.0 - одна из них).

Я пробовал запускать на многих других совместимых различных версиях iOS, все еще сталкивающихся с тем жевопрос.Я пробовал на 127.0.0.1:4723 и 0.0.0.0:4723.

- [TestNG] org.openqa.selenium.WebDriverException: java.io.IOException: неожиданное завершение потока в соединении {127.0.0.1:4723, proxy = DIRECT hostAddress = / 127.0.0.1:4723 cipherSuite = нет протокола = http / 1.1}

-Причиняется: java.io.EOFException: \ n не найден: limit = 0 content =…


2019-05-24 13:48:23:165 - [Appium] Welcome to Appium v1.9.1
2019-05-24 13:48:23:167 - [Appium] Non-default server args:
2019-05-24 13:48:23:170 - [Appium]   logTimestamp: true
2019-05-24 13:48:23:170 - [Appium]   defaultCapabilities: {
2019-05-24 13:48:23:170 - [Appium]     usePrebuiltWDA: true
2019-05-24 13:48:23:171 - [Appium]     derivedDataPath: /tmp/scratchmfswDs.scratch/DerivedData1JgqWF
2019-05-24 13:48:23:171 - [Appium]     platformName: iOS
2019-05-24 13:48:23:171 - [Appium]     automationName: XCUITest
2019-05-24 13:48:23:171 - [Appium]     deviceName: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:172 - [Appium]     app: /tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa
2019-05-24 13:48:23:172 - [Appium]     udid: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:173 - [Appium]   }
2019-05-24 13:48:23:173 - [Appium]   platformName: iOS
2019-05-24 13:48:23:173 - [Appium]   automationName: XCUITest
2019-05-24 13:48:23:173 - [Appium]   deviceName: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:173 - [Appium]   app: /tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa
2019-05-24 13:48:23:174 - [Appium]   udid: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:228 - [Appium] Deprecated server args:
2019-05-24 13:48:23:229 - [Appium]   --platform-name => --default-capabilities '{"platformName":"iOS"}'
2019-05-24 13:48:23:230 - [Appium]   --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
2019-05-24 13:48:23:230 - [Appium]   --device-name => --default-capabilities '{"deviceName":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0"}'
2019-05-24 13:48:23:230 - [Appium]   --app => --default-capabilities '{"app":"/tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa"}'
2019-05-24 13:48:23:231 - [Appium]   -U,--udid => --default-capabilities '{"udid":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0"}'
2019-05-24 13:48:23:231 - [Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
2019-05-24 13:48:23:231 - [Appium]   usePrebuiltWDA: true
2019-05-24 13:48:23:231 - [Appium]   derivedDataPath: /tmp/scratchmfswDs.scratch/DerivedData1JgqWF
2019-05-24 13:48:23:231 - [Appium]   platformName: iOS
2019-05-24 13:48:23:232 - [Appium]   automationName: XCUITest
2019-05-24 13:48:23:232 - [Appium]   deviceName: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:232 - [Appium]   app: /tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa
2019-05-24 13:48:23:232 - [Appium]   udid: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:23:429 - [Appium] Appium REST http interface listener started on 0.0.0.0:4723
2019-05-24 13:48:29:584 - [HTTP] --> POST /wd/hub/session
2019-05-24 13:48:29:584 - [HTTP] {"desiredCapabilities":{"bundleId":"some_bundle_id","platformName":"iOS"},"capabilities":{"desiredCapabilities":{"bundleId":"some_bundle_id","platformName":"iOS"},"firstMatch":[{"appium:bundleId":"some_bundle_id","platformName":"ios"}]}}
2019-05-24 13:48:29:587 - [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"bundleId":"some_bundle_id","platformName":"iOS"},null,{"desiredCapabilities":{"bundleId":"some_bundle_id","platformName":"iOS"},"firstMatch":[{"appium:bundleId":"some_bundle_id","platformName":"ios"}]}]
2019-05-24 13:48:29:588 - [debug] [BaseDriver] Event 'newSessionRequested' logged at 1558705709588 (06:48:29 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:29:592 - [BaseDriver] The capabilities ["usePrebuiltWDA","derivedDataPath","automationName","deviceName","app","udid"] are not standard capabilities and should have an extension prefix
2019-05-24 13:48:29:597 - [Appium] Creating new XCUITestDriver (v2.94.2) session
2019-05-24 13:48:29:597 - [Appium] Capabilities:
2019-05-24 13:48:29:597 - [Appium]   platformName: ios
2019-05-24 13:48:29:597 - [Appium]   usePrebuiltWDA: true
2019-05-24 13:48:29:597 - [Appium]   derivedDataPath: /tmp/scratchmfswDs.scratch/DerivedData1JgqWF
2019-05-24 13:48:29:598 - [Appium]   automationName: XCUITest
2019-05-24 13:48:29:598 - [Appium]   deviceName: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:29:598 - [Appium]   app: /tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa
2019-05-24 13:48:29:598 - [Appium]   udid: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:29:598 - [Appium]   bundleId: some_bundle_id
2019-05-24 13:48:29:602 - [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"usePrebuiltWDA":true,"der... were provided
2019-05-24 13:48:29:602 - [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
2019-05-24 13:48:29:612 - [BaseDriver] Session created with session id: 2b0a8f8e-26bc-4c58-9629-66f9f7fa338d
(node:464) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
2019-05-24 13:48:29:869 - [debug] [XCUITest] Current user: 'device-farm'
2019-05-24 13:48:30:348 - [debug] [XCUITest] Xcode version set to '10.1' (tools v9.4.0.0.1.1526532315)
2019-05-24 13:48:42:741 - [debug] [XCUITest] iOS SDK Version set to '12.1'
2019-05-24 13:48:42:741 - [debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1558705722741 (06:48:42 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:56:256 - [debug] [XCUITest] Available devices: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:56:257 - [debug] [XCUITest] Creating iDevice object with udid '4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0'
2019-05-24 13:48:56:260 - [XCUITest] Determining device to run tests on: udid: '4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0', real device: true
2019-05-24 13:48:56:262 - [BaseDriver] Using local app '/tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa'
2019-05-24 13:48:56:262 - [debug] [BaseDriver] Copying local zip to tmp dir
2019-05-24 13:48:56:286 - [BaseDriver] Unzipping local app '/tmp/2019424-464-d635jg.9mcjv/appium-app.zip'...
2019-05-24 13:48:56:316 - [debug] [BaseDriver] Unzipping /tmp/2019424-464-d635jg.9mcjv/appium-app.zip
2019-05-24 13:48:56:316 - [debug] [BaseDriver] Testing zip archive: /tmp/2019424-464-d635jg.9mcjv/appium-app.zip
2019-05-24 13:48:57:794 - [BaseDriver] Unzipped local app to '/tmp/2019424-464-d635jg.9mcjv/Payload/testProject.app'
2019-05-24 13:48:57:795 - [debug] [BaseDriver] Event 'appConfigured' logged at 1558705737795 (06:48:57 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:57:795 - [debug] [XCUITest] Checking whether app '/tmp/2019424-464-d635jg.9mcjv/Payload/SubmissionTracker.app' is actually present on file system
2019-05-24 13:48:57:796 - [debug] [XCUITest] App is present
2019-05-24 13:48:57:796 - [debug] [BaseDriver] Event 'resetStarted' logged at 1558705737796 (06:48:57 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:57:796 - [debug] [XCUITest] Reset: running ios real device reset flow
2019-05-24 13:48:57:797 - [debug] [BaseDriver] Event 'resetComplete' logged at 1558705737797 (06:48:57 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:57:799 - [debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
2019-05-24 13:48:57:800 - [debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
2019-05-24 13:48:58:584 - [debug] [XCUITest] Crash reports root '/Users/device-farm/Library/Logs/CrashReporter/MobileDevice/9902472561' does not exist. Got nothing to gather.
2019-05-24 13:48:58:584 - [debug] [BaseDriver] Event 'logCaptureStarted' logged at 1558705738584 (06:48:58 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:48:58:584 - [XCUITest] Setting up real device
2019-05-24 13:48:58:585 - [debug] [XCUITest] Verifying application platform
2019-05-24 13:48:58:596 - [debug] [XCUITest] CFBundleSupportedPlatforms: ["iPhoneOS"]
2019-05-24 13:49:01:091 - [debug] [XCUITest] Reset requested. Removing app with id 'some_bundle_id' from the device
2019-05-24 13:49:03:324 - [debug] [XCUITest] Installing '/tmp/2019424-464-d635jg.9mcjv/Payload/testProject.app' on device with UUID '4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0'...
2019-05-24 13:49:10:747 - [debug] [XCUITest] The app has been installed successfully.
2019-05-24 13:49:10:748 - [debug] [BaseDriver] Event 'appInstalled' logged at 1558705750748 (06:49:10 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:49:10:750 - [XCUITest] Using WDA path: '/usr/local/avm/versions/1.9.1/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
2019-05-24 13:49:10:752 - [XCUITest] Using WDA agent: '/usr/local/avm/versions/1.9.1/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
2019-05-24 13:49:10:815 - [debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
2019-05-24 13:49:10:820 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:49:10:821 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:49:10:836 - [debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'
2019-05-24 13:49:10:837 - [debug] [XCUITest] WDA is currently not running. There is nothing to cache
2019-05-24 13:49:10:837 - [debug] [XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval
2019-05-24 13:49:10:838 - [debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1558705750838 (06:49:10 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:49:10:839 - [XCUITest] Launching WebDriverAgent on the device
2019-05-24 13:49:10:955 - [debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
2019-05-24 13:49:10:955 - [debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
2019-05-24 13:49:39:997 - [debug] [XCUITest] Creating WebDriverAgent resources directory
2019-05-24 13:49:39:998 - [debug] [XCUITest] Creating WebDriverAgent resource bundle directory
2019-05-24 13:49:39:999 - [debug] [XCUITest] Cleaning the project scheme 'WebDriverAgentLib' to make sure there are no leftovers from previous installs
2019-05-24 13:49:52:882 - [debug] [XCUITest] Cleaning the project scheme 'WebDriverAgentRunner' to make sure there are no leftovers from previous installs
2019-05-24 13:50:01:514 - [debug] [XCUITest] Killing running processes 'xcodebuild.*4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0, iproxy 8100' for the device 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0...
2019-05-24 13:50:01:602 - [debug] [XCUITest] 'pgrep -nif xcodebuild.*4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0' didn't detect any matching processes. Return code: 1
2019-05-24 13:50:01:655 - [debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
2019-05-24 13:50:01:655 - [debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB for the device 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:50:06:818 - [XCUITest] Cannot parse major and minor version numbers from platformVersion "null". Will build for the default platform instead
2019-05-24 13:50:06:819 - [debug] [XCUITest] Beginning test with command 'xcodebuild test-without-building -project /usr/local/avm/versions/1.9.1/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /tmp/scratchmfswDs.scratch/DerivedData1JgqWF -destination id=4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0' in directory '/usr/local/avm/versions/1.9.1/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
2019-05-24 13:50:06:820 - [debug] [XCUITest] Output from xcodebuild will not be logged. To change this, use 'showXcodeLog' desired capability
2019-05-24 13:50:10:188 - [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
2019-05-24 13:50:10:188 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:10:189 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:11:340 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:11:340 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:12:380 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:12:380 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:13:433 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:13:433 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:14:477 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:14:478 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:15:508 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:15:509 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:15:750 - [debug] [XCUITest] Log file for xcodebuild test: /tmp/scratchmfswDs.scratch/DerivedData1JgqWF/Logs/Test/Test-WebDriverAgentRunner-2019.05.24_06-50-15--0700.xcresult/1_Test/Diagnostics/WebDriverAgentRunner-617486B3-34EB-4195-A160-0EF9A788792C/WebDriverAgentRunner-1E30900B-8D08-41D1-8C4E-7D02A3E9CDB5/Session-WebDriverAgentRunner-2019-05-24_065015-ghzVbu.log
2019-05-24 13:50:16:571 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'

2019-05-24 13:50:34:240 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:35:284 - [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-05-24 13:50:35:285 - [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
2019-05-24 13:50:35:361 - [debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"state\" : \"success\",\n    \"os\" : {\n      \"name\" : \"iOS\",\n      \"version\" : \"12.0\",\n      \"sdkVersion\" : \"12.0\"\n    },\n    \"ios\" : {\n      \"simulatorVersion\" : \"12.0\",\n      \"ip\" : \"192.168.1.10\"\n    },\n    \"build\" : {\n      \"upgradedAt\" : \"1558705779000\",\n      \"time\" : \"Nov 29 2018 13:42:57\",\n      \"productBundleIdentifier\" : \"com.facebook.WebDriverAgentRunner\"\n    }\n  },\n  \"sessionId\" : \"2C9B264F-15B5-4C9B-84AE-A19F79EE11B1\",\n  \"status\" : 0\n}"
2019-05-24 13:50:35:363 - [debug] [XCUITest] WebDriverAgent information:
2019-05-24 13:50:35:364 - [debug] [XCUITest] {
2019-05-24 13:50:35:364 - [debug] [XCUITest]   "state": "success",
2019-05-24 13:50:35:364 - [debug] [XCUITest]   "os": {
2019-05-24 13:50:35:364 - [debug] [XCUITest]     "name": "iOS",
2019-05-24 13:50:35:364 - [debug] [XCUITest]     "version": "12.0",
2019-05-24 13:50:35:364 - [debug] [XCUITest]     "sdkVersion": "12.0"
2019-05-24 13:50:35:364 - [debug] [XCUITest]   },
2019-05-24 13:50:35:365 - [debug] [XCUITest]   "ios": {
2019-05-24 13:50:35:365 - [debug] [XCUITest]     "simulatorVersion": "12.0",
2019-05-24 13:50:35:365 - [debug] [XCUITest]     "ip": "192.168.1.10"
2019-05-24 13:50:35:365 - [debug] [XCUITest]   },
2019-05-24 13:50:35:365 - [debug] [XCUITest]   "build": {
2019-05-24 13:50:35:365 - [debug] [XCUITest]     "upgradedAt": "1558705779000",
2019-05-24 13:50:35:365 - [debug] [XCUITest]     "time": "Nov 29 2018 13:42:57",
2019-05-24 13:50:35:366 - [debug] [XCUITest]     "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
2019-05-24 13:50:35:366 - [debug] [XCUITest]   }
2019-05-24 13:50:35:366 - [debug] [XCUITest] }
2019-05-24 13:50:35:366 - [debug] [XCUITest] WebDriverAgent successfully started after 28545ms
2019-05-24 13:50:35:367 - [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1558705835367 (06:50:35 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:50:35:368 - [debug] [XCUITest] Sending createSession command to WDA
2019-05-24 13:50:35:369 - [debug] [JSONWP Proxy] Matched '/session' to command name 'createSession'
2019-05-24 13:50:35:370 - [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"some_bundle_id","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
2019-05-24 13:50:37:324 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","capabilities":{"device":"iphone","browserName":"My Test Project","sdkVersion":"12.0","CFBundleIdentifier":"some_bundle_id"}},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":0}
2019-05-24 13:50:37:324 - [debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1558705837324 (06:50:37 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:50:37:324 - [debug] [BaseDriver] Event 'wdaStarted' logged at 1558705837324 (06:50:37 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:50:37:325 - [XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
2019-05-24 13:50:37:325 - [debug] [BaseDriver] Event 'orientationSet' logged at 1558705837325 (06:50:37 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:50:37:326 - [Appium] New XCUITestDriver session created successfully, session 2b0a8f8e-26bc-4c58-9629-66f9f7fa338d added to master session list
2019-05-24 13:50:37:327 - [debug] [BaseDriver] Event 'newSessionStarted' logged at 1558705837327 (06:50:37 GMT-0700 (Pacific Daylight Time))
2019-05-24 13:50:37:328 - [debug] [W3C] Cached the protocol value 'W3C' for the new session 2b0a8f8e-26bc-4c58-9629-66f9f7fa338d
2019-05-24 13:50:37:328 - [debug] [W3C] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"ios","usePrebuiltWDA":true,"derivedDataPath":"/tmp/scratchmfswDs.scratch/DerivedData1JgqWF","automationName":"XCUITest","deviceName":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","app":"/tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa","udid":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","bundleId":"some_bundle_id"}}
2019-05-24 13:50:37:332 - [HTTP] <-- POST /wd/hub/session 200 127747 ms - 629
2019-05-24 13:50:37:332 - [HTTP] 
2019-05-24 13:50:37:517 - [HTTP] --> GET /wd/hub/session/2b0a8f8e-26bc-4c58-9629-66f9f7fa338d
2019-05-24 13:50:37:517 - [HTTP] {}
2019-05-24 13:50:37:518 - [debug] [W3C] Calling AppiumDriver.getSession() with args: ["2b0a8f8e-26bc-4c58-9629-66f9f7fa338d"]
2019-05-24 13:50:37:519 - [debug] [XCUITest] Executing command 'getSession'
2019-05-24 13:50:37:530 - [debug] [JSONWP Proxy] Matched '/' to command name 'getSession'
2019-05-24 13:50:37:530 - [debug] [JSONWP Proxy] Proxying [GET /] to [GET http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E] with no body
2019-05-24 13:50:37:615 - [debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"sessionId\" : \"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E\",\n    \"capabilities\" : {\n      \"device\" : \"iphone\",\n      \"browserName\" : \"My Test Project\",\n      \"sdkVersion\" : \"12.0\",\n      \"CFBundleIdentifier\" : \"some_bundle_id\"\n    }\n  },\n  \"sessionId\" : \"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E\",\n  \"status\" : 0\n}"
2019-05-24 13:50:37:635 - [debug] [JSONWP Proxy] Proxying [GET /wda/screen] to [GET http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/wda/screen] with no body
2019-05-24 13:50:37:869 - [debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"statusBarSize\" : {\n      \"width\" : 375,\n      \"height\" : 20\n    },\n    \"scale\" : 2\n  },\n  \"sessionId\" : \"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E\",\n  \"status\" : 0\n}"
2019-05-24 13:50:37:872 - [debug] [JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/window/size] with no body
2019-05-24 13:50:38:006 - [debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"width\" : 375,\n    \"height\" : 667\n  },\n  \"sessionId\" : \"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E\",\n  \"status\" : 0\n}"
2019-05-24 13:50:38:007 - [XCUITest] Merging WDA caps over Appium caps for session detail response
2019-05-24 13:50:38:009 - [debug] [W3C] Responding to client with driver.getSession() result: {"udid":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","platformName":"ios","usePrebuiltWDA":true,"derivedDataPath":"/tmp/scratchmfswDs.scratch/DerivedData1JgqWF","automationName":"XCUITest","deviceName":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","app":"/tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa","bundleId":"some_bundle_id","device":"iphone","browserName":"My Test Project {","sdkVersion":"12.0","CFBundleIdentifier":"some_bundle_id","pixelRatio":2,"statBarHeight":20,"viewportRect":{"left":0,"top":40,"width":750,"height":1294}}
2019-05-24 13:50:38:044 - [HTTP] <-- GET /wd/hub/session/2b0a8f8e-26bc-4c58-9629-66f9f7fa338d 200 493 ms - 587
2019-05-24 13:50:38:044 - [HTTP] 
2019-05-24 13:50:38:046 - [HTTP] --> GET /wd/hub/session/2b0a8f8e-26bc-4c58-9629-66f9f7fa338d
2019-05-24 13:50:38:046 - [HTTP] {}
2019-05-24 13:50:38:047 - [debug] [W3C] Calling AppiumDriver.getSession() with args: ["2b0a8f8e-26bc-4c58-9629-66f9f7fa338d"]
2019-05-24 13:50:38:047 - [debug] [XCUITest] Executing command 'getSession'
2019-05-24 13:50:38:049 - [XCUITest] Merging WDA caps over Appium caps for session detail response
2019-05-24 13:50:38:050 - [debug] [W3C] Responding to client with driver.getSession() result: {"udid":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","platformName":"ios","usePrebuiltWDA":true,"derivedDataPath":"/tmp/scratchmfswDs.scratch/DerivedData1JgqWF","automationName":"XCUITest","deviceName":"4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0","app":"/tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa","bundleId":"some_bundle_id","device":"iphone","browserName":"My Test Project","sdkVersion":"12.0","CFBundleIdentifier":"some_bundle_id","pixelRatio":2,"statBarHeight":20,"viewportRect":{"left":0,"top":40,"width":750,"height":1294}}
2019-05-24 13:50:52:923 - [HTTP] {"using":"id","value":"testInput"}
2019-05-24 13:50:52:924 - [debug] [W3C] Calling AppiumDriver.findElement() with args: ["id","testInput","2b0a8f8e-26bc-4c58-9629-66f9f7fa338d"]
2019-05-24 13:50:52:924 - [debug] [XCUITest] Executing command 'findElement'
2019-05-24 13:50:52:925 - [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
2019-05-24 13:50:52:925 - [debug] [BaseDriver] Waiting up to 6000000 ms for condition
2019-05-24 13:50:52:926 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:52:926 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:53:129 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:53:130 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
2019-05-24 13:50:53:130 - [debug] [BaseDriver] Waited for 205 ms so far
2019-05-24 13:50:53:709 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:53:710 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:53:923 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:53:924 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
2019-05-24 13:50:53:924 - [debug] [BaseDriver] Waited for 999 ms so far
2019-05-24 13:50:54:442 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:54:442 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:54:635 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:54:636 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
2019-05-24 13:50:54:636 - [debug] [BaseDriver] Waited for 1711 ms so far
2019-05-24 13:50:55:277 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:55:277 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:55:491 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:55:491 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
2019-05-24 13:50:55:491 - [debug] [BaseDriver] Waited for 2566 ms so far
2019-05-24 13:50:55:991 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:55:992 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:56:155 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:56:155 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
2019-05-24 13:50:56:156 - [debug] [BaseDriver] Waited for 3231 ms so far
2019-05-24 13:50:56:701 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:56:702 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:56:913 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:56:913 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError

1 Ответ

1 голос
/ 27 мая 2019

Спасибо за размещение этих журналов! Похоже, что возможности действительны (хотя идентификатор пакета явно недействителен). Идентификатор bundleId будет автоматически взят из файла ipa, поэтому нет необходимости указывать его, если у нас также есть возможность app.

http://appium.io/docs/en/writing-running-appium/caps/#ios-only

Идентификатор пакета тестируемого приложения. Полезно для запуска приложения на реальном устройстве или для использования других заглавных букв, которым требуется идентификатор комплекта при тестовом запуске. Чтобы запустить тест на реальном устройстве с использованием идентификатора пакета, вы можете опустить функцию «app», но вы должны предоставить «udid».

Возможности по умолчанию, необходимые для запуска приложения, должны быть уже предоставлены командой CLI сервера appium по умолчанию в файле testspec.yml.

appium --log-timestamp --device-name $DEVICEFARM_DEVICE_NAME --platform-name $DEVICEFARM_DEVICE_PLATFORM_NAME --app $DEVICEFARM_APP_PATH --udid $DEVICEFARM_DEVICE_UDID --automation-name XCUITest --default-capabilities "{\"usePrebuiltWDA\": true, \"derivedDataPath\":\"$DEVICEFARM_WDA_DERIVED_DATA_PATH_V1\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &

Возможность

2019-05-24 13:48:29:597 - [Appium] Creating new XCUITestDriver (v2.94.2) session
2019-05-24 13:48:29:597 - [Appium] Capabilities:
2019-05-24 13:48:29:597 - [Appium]   platformName: ios
2019-05-24 13:48:29:597 - [Appium]   usePrebuiltWDA: true
2019-05-24 13:48:29:597 - [Appium]   derivedDataPath: /tmp/scratchmfswDs.scratch/DerivedData1JgqWF
2019-05-24 13:48:29:598 - [Appium]   automationName: XCUITest
2019-05-24 13:48:29:598 - [Appium]   deviceName: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:29:598 - [Appium]   app: /tmp/scratchmfswDs.scratch/share-djkVWj.scratch/app-A1XQ83.ipa
2019-05-24 13:48:29:598 - [Appium]   udid: 4aeaf84dd2abb30c8b5474b0fa1a9c925c9df7c0
2019-05-24 13:48:29:598 - [Appium]   bundleId: some_bundle_id

Поскольку ошибка в данном случае касается того, как найти элемент, я думаю, что для этого лучше всего распечатать исходный код и сначала подтвердить, что этот элемент есть. Вы также можете сделать это, используя возможность, которая будет печатать исходный код страницы при возникновении ошибки скрипта.

http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities

printPageSourceOnFindFailure При сбое операции поиска распечатайте источник текущей страницы. По умолчанию false. например, верно

Фрагмент журнала сервера Appium

2019-05-24 13:50:56:701 - [debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
2019-05-24 13:50:56:702 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E/element] with body: {"using":"id","value":"testInput"}
2019-05-24 13:50:56:913 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"testInput","description":"unable to find an element"},"sessionId":"5CDDA2BB-9B89-4359-8E8B-F8F3B99AE45E","status":7}
2019-05-24 13:50:56:913 - [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError

Можете ли вы распечатать страницу источника и проверить результат?

НТН

-Джеймс

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...