Appium not switiching context from NATIVE APP to Webview for android real device

Appium not switching context from NATIVE APP to WebView for android real device.

I’m Using the Android With API level 19 and I set autoWebView to true in capability.

My code: -

Appium Log is:-

Please any one tell why I’m getting Native app only I set 60 second implicity to wait for loading the screen.
It should display webview and native app rite.

@vijay_kumar: By default command timeout is 60 sec. You have to increase the time out. Set the capability as capabilities.setCapability(“newCommandTimeout”, “180”);

AppiumDriver driver = new AndroidDriver(new URL(“”), capabilities);
To switch from Native app to webview use

still facing same issue @tariful

@vijay_kumar: Same log u r getting?
As per your log, only NATIVE_APP is available in your app

We are currently having same issue. The webview context can not be found. It happens on all the emulator and every device under Lollipop.

We had also tried both Appium 1.3.7 and 1.4.0, no luck.

The test previous was working. This things happened all suddenly, we didn’t update anything for Appium recently. We guess this might have to do with the system update or android sdk update. Hope someone can give us the answer.

1 Like

Is this the reason?

It’s been introduced recently (with 5.0).
Is Android handling webviews differently now?

@popeztl , is it working fine for Appium low version? below 1.3.7

No idea, could be. but any idea for the solution?

We haven’t try. However I don’t think that is the problem. because it was working with 1.3.7

Please update. Is anyone finds a way to switch to WEB_VIEW as it shows only NATIVE_APP as available context.

Use selendroid for same, u need to change capabilities as well for same