Hi,
I am using following setup:
-
Appium version 1.4.16.
-
API level 23
-
Java 1.8
-
Maven
-
android version 6.0.1
-
API level 23
I have added ChromedriverHandler.jar and two methods(ChromedriverHandler.chromeDriverHandlerThread().start(),ChromedriverHandler.chromeDriverHandlerThread().stop)I have put for loop for context switching.it iterates 4 times,but each time different exception is throwing.But finally fails to switch.
I am finding following problems:
1)driver.getContextHandles(), sometimes returns webview_undefined.
2)sometimes driver.getContextHandles() is able to retrieve context but it fails to switch.It throws context not found exception.
3)after adding ChromedriverHandler.jar i am finding one more exception .i.eorg.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: We already have a chromedriver instance running)
Below images contain snapshot of stack trace and appium log.