facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.38k forks source link

Cannot get 'xml' source of the current application in Appium Inspector by using WebDriverAgent #1001

Open Jjoga143 opened 6 years ago

Jjoga143 commented 6 years ago

When I have tried to inspect a particular page having webservice calls on UI elements of an IOS app in iPhone X simulator, the app crashes, appium inspector throws the error as follows and the app gets closed.

Error in Appium Inspector window - Could not obtain source: {“cause”:{“sessionId”:“28833cee-e0ea-4a9d-abac-eca0d2f7ad88”,“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command. Original error: Cannot get ‘xml’ source of the current application”}},“jsonwire-error”:{“detail”:“An unknown server-side error occurred while processing the command.”,“status”:13,“summary”:“UnknownError”},“message”:"[source()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Cannot get ‘xml’ source of the current application",“status”:13}

Environment - I am running Appium Desktop version _1.7.1. in Mac Automating platform - IOS 11.4 WebDriverAgent used - cloned from https://github.com/facebook/WebDriverAgent/ Appium version - latest version 1.9.1 Appium Desktop version - latest version 1.7.1 iPhone X IOS simulator The language used for writing tests - NodeJS , webdriverIO System OS - Mac OS X High Sierra 10.13.6

screenshot1 screenshot2

ManituPC commented 6 years ago

I also get this error, but when I try inspect screen with 3D model Could not obtain source: {"cause":{"sessionId":"f4c2efae-5ef3-4242-a7dc-18a6c19b1ca0","status":13,"value":{"message":"An unknown server-side error occurred while processing the command. Original error: Cannot get 'xml' source of the current application"}},"jsonwire-error":{"detail":"An unknown server-side error occurred while processing the command.","status":13,"summary":"UnknownError"},"message":"[source()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Cannot get 'xml' source of the current application","status":13}

hrabkin commented 5 years ago

I found out recently that this error happened to me because of used accessebilityIdentifiers on elements without any values specified, empty. By removing them it backs to work normally