How to resolve "No such context" found exception

I’m seeing “No such context found” exception and also “webview” does not appear for my hybrid app in real device. How to resolve this issue? Please help me to solve this.

// Switching code

Set contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println( contextName );
if (contextName.contains( “WEBVIEW” )) {
driver.context( contextName );
System.out.println( contextName );
try {
Thread.sleep( 1500 );
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}

You can watch this video : https://youtu.be/Pc_CkDO_2Pc

Thanks, I will try it and let you know.

Didn’t work for me…

you can fix that???