iOS 11: Getting errors when execute TakesScreenshot action

Getting errors when execute following code:
((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

Configurations:

  1. MAC OS: macOS 10.12.6
  2. Xcode version: 9
  3. Appium: 1.6.5
  4. Selenium: 3.2.0
  5. Java-client: 4.2.1
  6. iOS device: 11.0

Error in Script Execution Console:

An unknown server-side error occurred while processing the command. Original error: Unable to take screenshot. WDA returned ‘{}’

Error in Appium Server-side:

[debug] [MJSONWP] Calling AppiumDriver.getScreenshot() with args: [“f6863f4a-fcec-4fc5-b385-50ea0ea84bc1”]

[debug] [XCUITest] Executing command ‘getScreenshot’

[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/FAB39F06-EEFA-4013-BD2B-7696DA9927AC/screenshot] with no body

[debug] [JSONWP Proxy] Got response with status 200: “{\n “value” : {\n\n },\n “sessionId” : “FAB39F06-EEFA-4013-BD2B-7696DA9927AC”,\n “status” : 0\n}”

[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/FAB39F06-EEFA-4013-BD2B-7696DA9927AC/screenshot] with no body

[MJSONWP] Encountered internal error running command: Error: Unable to take screenshot. WDA returned ‘{}’

at XCUITestDriver.callee$1$0$ (../../../lib/commands/screenshots.js:20:13)

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)

[HTTP] <-- GET /wd/hub/session/f6863f4a-fcec-4fc5-b385-50ea0ea84bc1/screenshot 500 10600 ms - 215

Anybody faced the error while calling Takescreenshot on iOS 11?

Try updating to 1.7.0 beta first, thats the version that has iOS11 support:

npm install [email protected]

You should update your selenium (3.5.3) and java-client (5.0.3) version also.

@Telmo_Cardoso Thanks for the details. I will update the Appium version to 1.7.0 and try from my end.

@Telmo_Cardoso iOS 11 working with Appium 1.7.0

@sanoj27
Can you share the setup required for automating iOS11.
For iOS10 currently we are installing WDA through xcode 8.3.3… is there anything elese to do for iOS11 ?

@Kishore_v same setup is working with iOS 11

@Swapan_Chhabra
I tired with the same setup, upgraded the appium to 1.7.1 and Mac os to 10.12.6… webdriver agent got installed in the device.
But i am getting error while executing test scripts, “Failed to create WDA session”
In release notes its mentioned like “use xctestrun file to launch WDA”, u have any idea on this ?