Getting errors when execute following code:
((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
Configurations:
- MAC OS: macOS 10.12.6
- Xcode version: 9
- Appium: 1.6.5
- Selenium: 3.2.0
- Java-client: 4.2.1
- 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?