I am not able to switch from native to web view in iOS application . I tried using below code it is not working not able to switch
Set contextHandles = driver.getContextHandles();
for (String s : contextHandles)
{
System.out.println(“content :”+ s);
if(s.contains(“WEBVIEW”)) {
driver.context(s);
}
}
can someone please help how switch from native to web view
always getting below error
Driver info: driver.version: AppiumDriver
at io.appium.java_client.AppiumDriver.getContextHandles(AppiumDriver.java:227)
at ZDebugTests.iOSTest.main(iOSTest.java:50)
Caused by: java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to java.util.List
at io.appium.java_client.AppiumDriver.getContextHandles