What I am basically trying to do: Read the UI element properties for the iOS native app.
Issue: Appium Inspector does not work for iOS devices with Appium 1.6.0. I receive the following error.
Error:
Possible cause:
When we hit Appium Inspector button, I believe there is a new session created with default server capabilities, one of them is automation name set as “Appium” instead of “XCUITest”. We do not have a drop down to enter Automation Name in the iOS setting, like we have for Android settings. It seems like the value Appium is hard coded into the GUI code.
Look for this text in the log below.
“I hit the Appium Inspector button about this time”
You will find the automation name being sent as Appium in the logs below this title.
As found in the error within Appium GUI._
[debug] [iOS] Xcode version set to 8.1
[iOS] SessionNotCreatedError: A new session could not be created. Details: Appium’s IosDriver does not support xcode version 8.1. Apple has deprecated UIAutomation. Use the “XCUITest” automationName capability instead.
_ at IosDriver.createSession$ (lib/driver.js:120:28)_
_ at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)_
_ at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
_ at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)_
_ at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)_
_ { SessionNotCreatedError: A new session could not be created. Details: Appium’s IosDriver does not support xcode version 8.1. Apple has deprecated UIAutomation. Use the “XCUITest” automationName capability instead._
_ at IosDriver.createSession$ (lib/driver.js:120:28)_
_ at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)_
_ at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
_ at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)_
_ at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) jsonwpCode: 33 }_
_[HTTP] <-- POST /wd/hub/session 500 62 ms - 243 _ _
Solutions/Workarounds tried:
- Added a server capability for Automation Name through Developer Settings in Appium GUI.
A catch here:
Look at the errors closely.
The capability Automation Name “XCUITest” which I added to Developer Settings, is picked up while creating the appium server instance but is not picked while starting the appium inspector.
[Appium] Welcome to Appium v1.6.0
[Appium] Non-default server args:
[Appium] launch: true
[Appium] logNoColors: true
[Appium] debugLogSpacing: true
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘9.3’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iPhone 6’
[Appium] app: ‘/Users/’
[Appium] udid:
[Appium] fullReset: true
[Appium] nativeInstrumentsLib: true
[Appium] showIOSLog: true
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities ‘{“platformName”:“iOS”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“9.3”}’
[Appium] --automation-name => --default-capabilities '{“automationName”:“XCUITest”}'
[Appium] --device-name => --default-capabilities ‘{“deviceName”:“iPhone 6”}’
[Appium] --app => --default-capabilities ‘{“app”:"/Users/<>"}’
[Appium] -U,–udid => --default-capabilities ‘{“udid”:"<>"}’
[Appium] --full-reset => --default-capabilities ‘{“fullReset”:true}’
[Appium] --native-instruments-lib => --default-capabilities ‘{“nativeInstrumentsLib”:true}’
[Appium] --show-ios-log => --default-capabilities ‘{“showIOSLog”:true}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘9.3’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iPhone 6’
[Appium] app: ‘/Users/’
[Appium] udid: ‘’
[Appium] fullReset: true
[Appium] nativeInstrumentsLib: true
[Appium] showIOSLog: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”… _
I hit the Appium Inspector button at this point of time
_
_[HTTP] <-- GET /wd/hub/status 200 12 ms - 83 _
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”…
_[HTTP] <-- GET /wd/hub/status 200 8 ms - 83 _
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
_[HTTP] <-- GET /wd/hub/sessions 200 2 ms - 40 _
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“9.3”,“app”:"<>",“automationName”:“Appium”,“udid”:"<>",“deviceName”:“iPhone 6”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“platformName”:“iOS”,"pla…
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘9.3’
[Appium] app: ‘’
[Appium] automationName: 'Appium’
[Appium] udid: ‘’
[Appium] deviceName: ‘iPhone 6’
[Appium] fullReset: true
[Appium] nativeInstrumentsLib: true
[Appium] showIOSLog: true
[BaseDriver] Session created with session id: 5aff1dfd-c8e3-4e5e-bea4-72b6ca7cacbc
[debug] [iOS] Xcode version set to 8.1
[iOS] SessionNotCreatedError: A new session could not be created. Details: Appium’s IosDriver does not support xcode version 8.1. Apple has deprecated UIAutomation. Use the “XCUITest” automationName capability instead.
_ at IosDriver.createSession$ (lib/driver.js:120:28)_
_ at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)_
_ at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
_ at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)_
_ at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)_
_ { SessionNotCreatedError: A new session could not be created. Details: Appium’s IosDriver does not support xcode version 8.1. Apple has deprecated UIAutomation. Use the “XCUITest” automationName capability instead._
_ at IosDriver.createSession$ (lib/driver.js:120:28)_
_ at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)_
_ at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
_ at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)_
_ at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) jsonwpCode: 33 }_
_[HTTP] <-- POST /wd/hub/session 500 62 ms - 243 _
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”…
[HTTP] <-- GET /wd/hub/status 200 9 ms - 83