Run Appiumtest on iOS Realdevice via. Intern

Hello @ all,

I’m currently trying to run my tests on an iOS iPhone7 PLUS.
The current situation is that I can trigger my testsuite from IntelliJ to the selenium HUB (Windows) and route the request to Appium Server (Mac). After that my WebDriverAgentRunner starts and open Safari on my iPhone unforunatley it starts appium.io instead of running my testsuite. Any Suggestions what could be the reason?

Below you can see the general informations and my AppiumServer Logfile.

Thank you in advance!!!

Best Regards

Kai

General:

Windows:

Windows 7
Running Selenium Hub (java -jar selenium-server-standalone-3.4.0.jar -role hub)

Intern configuration:

tunnel: “NullTunnel”,
tunnelOptions: {
host: “localhost:4444”
// port: “4444”
},

environments: [ {
    browserName: "Safari",
    platformName: [ "iOS"],
    platformVersion: [ "10.3" ],
    platform: [ "MAC" ],
    deviceName: ["iPhone7Plus"],
    // fixSessionCapabilities: "false"
}],
 proxyUrl: "http://XXXXX000:9000/",

Mac Book iOS 10.12.5 Sierra :
Appium Version 1.6.5
Running Appium Server (appium --nodeconfig iPhoneNode.json -U XXXX)

iPhoneNode.json
{
“capabilities”: [
{
“browserName”: “Safari”,
“maxInstance”: 1,
“platformName”: “iOS”,
“platformVersion” : “10.3”,
“startIWDP”: true,
“udid”: “UID_Pseudo”,
“deviceName”: “iPhone7Plus”,
“platform”: “MAC”
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”: “http://XXXXX:4723/wd/hub”,
“host”: “XXXXX”,
“port”: 4723,
“maxSession”: 1,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “XXXXX000”,
“hub”: “XXXXX000:4444/grid/register”
}
}

I install the following packages on Mac:

npm install -g appium
npm install -g ios-deploy
npm install appium doctor
brew install libtoolize
brew install automaker
brew install --HEAD libmobiledevice
xcode-select–install
brew install carthage

Real Device
iPhone 7
Installed Apps
SafariLauncher & WebDriverAgentRunner via xCode

Now i try to start my envrioment:

Start SeleniumGrid Hub Sucessfully
Start AppiumServer and Connect to Hub Sucessfully

Start Test from IntelleJ getTimeout

Now the iPhone is Opening the Safari Browser and it navigate to the wrong wesbite (appium.io website)

For details see AppiumServerLog:

[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“name”:“build/webapp/app/intern”,“idle-timeout”:60,“browserName”:“Safari”,“platformName”:“iOS”,“platformVersion”:“10.3”,“platform”:“MAC”,“deviceName”:“iPhone7Plus”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1500650988235 (17:29:48 GMT+0200 (CEST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] name: ‘build/webapp/app/intern’
[Appium] idle-timeout: 60
[Appium] browserName: ‘Safari’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.3’
[Appium] platform: ‘MAC’
[Appium] deviceName: ‘iPhone7Plus’
[Appium] udid: ‘UID_Pseudo’
[debug] [XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: name, idle-timeout, platform.
[BaseDriver] Session created with session id: fa9234e0-c195-4384-9b29-8d437a76d215
[debug] [XCUITest] Xcode version set to ‘8.3.3’ (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1500650988431 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Available devices: UID_Pseudo
[debug] [XCUITest] Creating iDevice object with udid ‘UID_Pseudo’
[XCUITest] Determining device to run tests on: udid: ‘UID_Pseudo’, real device: true
[XCUITest] Safari test requested
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1500650988601 (17:29:48 GMT+0200 (CEST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1500650988754 (17:29:48 GMT+0200 (CEST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1500650988757 (17:29:48 GMT+0200 (CEST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=UID_Pseudo -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /Users/tnk/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/BA8AABB7-9F1B-4C6F-9D63-BE4B3250C46E/Session-WebDriverAgentRunner-2017-07-21_172956-nNAexN.log
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
ebug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651032579 (17:30:32 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651033651 (17:30:33 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651034660 (17:30:34 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651035670 (17:30:35 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651036680 (17:30:36 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651037690 (17:30:37 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651038751 (17:30:38 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
^C[Appium] Received SIGINT - shutting down
[debug] [XCUITest] iproxy exited with code ‘null’

Any suggestions?

Hi @kailo777

Looks like WDA session is not created correctly. Follow the steps available @ https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md to setup the environment on Real devices

Hey @SireeshaSimakurthy thank your for the replay :slight_smile: I will try it on monday hopefully its solved my problem.

hi @SireeshaSimakurthy,

I follow the guide https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md.

And configure my workspace like in the Basic (automatic) configuration part descript. Unfortunately it didnt work so i switch to the part Basic (manual) configuration and I’m stuck at the part with testing the build

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=’ test

The test is running without an end see log:

2017-07-24 09:00:26.860964+0200 XCTRunner[259:9227] Running tests…
2017-07-24 09:00:27.495866+0200 XCTRunner[259:9227] Continuing to run tests in the background with task ID 1
Test Suite ‘All tests’ started at 2017-07-24 09:00:28.149
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-07-24 09:00:28.150
Test Suite ‘UITestingUITests’ started at 2017-07-24 09:00:28.150
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-07-24 09:00:28.151
t = 0.00s Set Up
2017-07-24 09:00:28.162188+0200 XCTRunner[259:9347] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x17011f1d0> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application’s container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-07-24 09:00:28.162802+0200 XCTRunner[259:9227] Built at Jul 24 2017 07:59:00
2017-07-24 09:00:28.179892+0200 XCTRunner[259:9227] ServerURLHere->http://10.192.1.103:8100<-ServerURLHere

Any suggestions? :frowning:

Is WebDriverAgent is successfully launched in your mobile? If yes, try to execute your test script as see what happens.

Yes the WebDriventAgent successfully launched my mobile phone but it instead of running my testsuite its excexute the following part

see:

[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500923932619 (21:18:52 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:["-u",“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}

Can you please share the complete logs

Hopefully this all what you need! Thanks in advance !

cat iPhoneSafariLauncher.json
{
“capabilities”: [
{
“browserName”: “Safari”,
“maxInstance”: 1,
“platformName”: “iOS”,
“platformVersion” : “10.3”,
“udid”: “TestUid”,
“deviceName”: “iPhone7Plus”,
“bundleId” : “com.qlive.SafariLauncher”,
“startIWDP”: true
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”: “http://localhost:4723/wd/hub”,
“host”: “localhost”,
“port”: 4723,
“maxSession”: 1,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “N000036”,
“hub”: “N000036:4444/grid/register”
}
}

Downloads tnk$ appium --nodeconfig iPhoneSafariLauncher.json -U TestUid --app com.qlive.SafariLauncher
[Appium] Welcome to Appium v1.6.5
[Appium] Non-default server args:
[Appium] nodeconfig: iPhoneSafariLauncher.json
[Appium] app: com.qlive.SafariLauncher
[Appium] udid: TestUid
[Appium] Deprecated server args:
[Appium] --app => --default-capabilities ‘{“app”:“com.qlive.SafariLauncher”}’
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“TestUid”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] app: ‘com.qlive.SafariLauncher’
[Appium] udid: ‘TestUid’
[debug] [Appium] Starting auto register thread for grid. Will try to register every 5000 ms.
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
[HTTP] ← GET /wd/hub/status 200 16 ms - 83
[debug] [Appium] Appium successfully registered with the grid on N000036:4444
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
[HTTP] ← GET /wd/hub/status 200 11 ms - 83
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
[HTTP] ← GET /wd/hub/status 200 11 ms - 83
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
[HTTP] ← GET /wd/hub/status 200 10 ms - 83
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
[HTTP] ← GET /wd/hub/status 200 11 ms - 83
[HTTP] → POST /wd/hub/session {“desiredCapabilities”:{“name”:“build/webapp/app/intern”,“idle-timeout”:60,“deviceName”:“iPhone7Plus”,“platformName”:“iOS”,“platformVersion”:“10.3”,“browserName”:“Safari”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“name”:“build/webapp/app/intern”,“idle-timeout”:60,“deviceName”:“iPhone7Plus”,“platformName”:“iOS”,“platformVersion”:“10.3”,“browserName”:“Safari”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1500927760296 (22:22:40 GMT+0200 (CEST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] name: ‘build/webapp/app/intern’
[Appium] idle-timeout: 60
[Appium] deviceName: ‘iPhone7Plus’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.3’
[Appium] browserName: ‘Safari’
[Appium] app: ‘com.qlive.SafariLauncher’
[Appium] udid: ‘TestUid’
[debug] [XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: name, idle-timeout.
[BaseDriver] Session created with session id: e29626b1-46c5-456c-8756-0f57488bc1f1
[debug] [XCUITest] Xcode version set to ‘8.3.3’ (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1500927760422 (22:22:40 GMT+0200 (CEST))
[debug] [XCUITest] Available devices: TestUid
[debug] [XCUITest] Creating iDevice object with udid ‘TestUid’
[XCUITest] Determining device to run tests on: udid: ‘TestUid’, real device: true
[XCUITest] Safari test requested
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1500927760538 (22:22:40 GMT+0200 (CEST))
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1500927760539 (22:22:40 GMT+0200 (CEST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1500927760541 (22:22:40 GMT+0200 (CEST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1500927760693 (22:22:40 GMT+0200 (CEST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1500927760695 (22:22:40 GMT+0200 (CEST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=TestUid -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "10.3.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3.2",\n "ip" : "10.192.1.96"\n },\n "build" : {\n "time" : "Jul 24 2017 21:50:21"\n }\n },\n "sessionId" : "831B5AEC-A497-41D4-BC09-E63C3E586AB9",\n "status" : 0\n}”
[debug] [XCUITest] WebDriverAgent running on ip ‘10.192.1.96’
[debug] [XCUITest] WebDriverAgent successfully started after 472ms
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927766290 (22:22:46 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Log file for xcodebuild test: /Users/tnk/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/D53C7369-E312-4FD8-8342-A6CDB713B807/Session-WebDriverAgentRunner-2017-07-24_222247-CFwFJr.log
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927769002 (22:22:49 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927770013 (22:22:50 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927771022 (22:22:51 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927772033 (22:22:52 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927773041 (22:22:53 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927774051 (22:22:54 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927775067 (22:22:55 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927776076 (22:22:56 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927777136 (22:22:57 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927778148 (22:22:58 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927779158 (22:22:59 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] ← GET /wd/hub/status - - ms - -
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927780172 (22:23:00 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927781186 (22:23:01 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500927782239 (22:23:02 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:[“-u”,“http://appium.io”],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [XCUITest] Unable to start WebDriverAgent session: Could not proxy command to remote server. Original error: Error: socket hang up
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 1021)
[XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’
[XCUITest] Shutting down iproxy process (pid 1018)
[debug] [XCUITest] iproxy exited with code ‘null’
[debug] [XCUITest] Removing WDA application from device
[HTTP] → GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:

Do you want to launch Safari? If yes, there is no need of bundleId. Use below capabilities once and try

[Appium] Capabilities:
[Appium] PLATFORM_VERSION: ‘10.2’
[Appium] automationName: ‘XCUITest’
[Appium] browserName: ‘Safari’
[Appium] deviceName: ‘iPod’
[Appium] platformName: ‘iOS’
[Appium] udid: ‘xxxxx’
[Appium] xcodeConfigFile: ‘/Users/ssimakurthy/Documents/Automation_Artifacts/mobile-automation-suite/resources/XCode_Config.xcconfig’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true

Hey @SireeshaSimakurthy,

the following link:

[Appium] xcodeConfigFile: ‘/Users/ssimakurthy/Documents/Automation_Artifacts/mobile-automation-suite/resources/XCode_Config.xcconfig’

is this the whole xcode configuration file or just the Basic (automatic) configuration (xcodeOrgId and xcodeSigningId) ?

Edit

I run both and get the error Failed to background testrunner.

Best Regards

Kai

Its just xcodeOrgId and xcodeSigningId like below

DEVELOPMENT_TEAM = XXXXXXXX
CODE_SIGN_IDENTITY = iPhone Developer

Excuse me for the late replay … I still facing the same issue.

Just for unterstanding I need the WebDriverAgentRunner to run SafariLauncher and then I can run my test correct?

Best Regards

Kai