Newbie--> appium inspector with android hybrid autoWebview=true

Hi, i am playing with appium inspector trying to capture webview context.
Appium-dektop 1.2.7, appium server 1.7.2, chromedriver 2.3.4
AUT is a “cordova create” test application

I tried diferent capabilities but in all cases i get the android driver capturing app source via uiatomator.

I’m expecting to get something similar to chrome://inspect debug with html code

I’m wrong? can appium inspect code via selenium chromedriver? or uiatomator is the way to get webview code?

All these test have the same result, inspect works but i see android xml instead of HTML.

{
“platformName”: “Android”,
“platformVersion”: “7.0”,
“deviceName”: “xiaomi”,
“androidUseRunningApp”: true,
“appPackage”: “com.lasterra.test”,
“appActivity”: “.MainActivity”,
“autoWebview”: true,
“automationName”: “Appium”
}

{
“platformName”: “Android”,
“platformVersion”: “7.0”,
“deviceName”: “xiaomi”,
“androidUseRunningApp”: true,
“appPackage”: “com.lasterra.test”,
“appActivity”: “.MainActivity”,
“autoWebview”: false,
“automationName”: “Appium”
}

{
“platformName”: “Android”,
“platformVersion”: “7.0”,
“deviceName”: “xiaomi”,
“androidUseRunningApp”: true,
“appPackage”: “com.lasterra.test”,
“appActivity”: “.MainActivity”,
“autoWebview”: false,
“automationName”: “UiAutomator2”
}

If i set autoWebView=true with UIAutomator2, appium can’t change to webview context after several tries.
I also tried to set ‘chromeOptions’: {‘windowTypes’: [‘webview’]} but appium desktop didn’t let me save json object as a capability.

Regards,

Lasterra

It seems to me that is a bug in AndroidDriver, that didn’t change to WEBVIEW context

[AndroidDriver] Found webviews: [“WEBVIEW_chrome”,“WEBVIEW_com.XXXXX”]
[AndroidDriver] Available contexts: [“NATIVE_APP”,“WEBVIEW_chrome”,“WEBVIEW_com.XXXX”]
[MJSONWP] Responding to client with driver.setContext() result: null

should be?

it seems that it is an unavailable feature.

The docs aren’t very clear about this. It is true that most hybrid apps could be tested using browser, and mocking android/ios features, but i think it could be a good feature to record and play against real devices.