Native elements are not populated in appium inspector for Hybrid application

Hi Team,

App under test- Hybrid application developed in ionic.
OS- Android specific issue. (iOS works fine)

Issue: Appium inspector use to pick up native components and had used it for automation. But however i had to switch over to another machine (Mac) and did the setup but now i see that appium inspector doesn’t pick up the native components, instead i can just inspect it in Webview. There has been no change in the codebase of the app. However iOS seems to be working fine.

While investigating if the code in ionic - Display-contents is changed to block, it works fine and appium inspector is able to populate the native components.

Please let me know if there’s any workaround on this.

Can you see these elements in android studio inspector?

I am afraid i am not able to… Its just keep loading and doesn’t give any results.

Also can’t see anything in app inspection screen.

did you try to add enableMultiWindows capability with Appium android driver?

thanks for your reply, I had tried that, but that doesn’t seem to work. (enableMultiWindows, tried setting that to true).

Try appium inspector to view native elements and use dev tool chrome to inspect web element

capabilities.setCapability(“platformName”, “Android”);

capabilities.setCapability(“platformVersion”, “11”);

capabilities.setCapability(“deviceName”, “emulator-5554”);

capabilities.setCapability(“app”, apkpath );

capabilities.setCapability(“automationName”, “UiAutomator2”);

capabilities.setCapability(“udid”, “emulator-5554”);

capabilities.setCapability(“ensureWebviewsHavePages”, true );

capabilities.setCapability(“autoGrantPermissions”, “true”);

capabilities.setCapability(“setWebContentsDebuggingEnabled”, true );

capabilities.setCapability(“BROWSER_NAME”, “Chrome”);

I able to see option for both Native and webcontext via Appium inspector