0

Unable to set driver context to Webview on AWS Device Farm

Setting context to Webview on AWS Device Farm throwing error. System.Out.Println(driver.getContextHandles()) >> output shows only NATIVE_APP

Does WebView context exist on AWS Device Farm?

Below code works in my local but throws error while setting context to webview on AWS device farm.

Set<String> contextNames = ad.getContextHandles();
System.out.println("contextNames found "+contextNames); 
for (String contextName : contextNames) {
if (contextName.contains("WEBVIEW")){
try{
ad.context(contextName);
bView = true;
}
catch (Exception e){

Other info:

Device Android Version: 6.0.1
Language: Java

halfer
  • 19,824
  • 17
  • 99
  • 186
kalyan
  • 11
  • 2

1 Answers1

0

I work for the AWS Device Farm team.

It seems you are trying to test a hybrid app with iOS 10 on Device Farm that configuration is currently not supported.

For all other cases:

  1. Make sure you are adding a delay after trying to switch context. This seems to have helped a lot of Appium users.

  2. Hybrid apps are supported on Device Farm but with Appium 1.4.3 for both Android and iOS with the exception of the version mentioned above for iOS 10.

  3. Please share the error that you are seeing and I can update this answer accordingly.

Hope that helps.

NikofTime
  • 729
  • 3
  • 4
  • Still see the issue. – kalyan Mar 21 '17 at 12:25
  • 1) Script has enough delay 2) I selected 1.6.3 in AWS device farm while creating the run, My POM appium dependency uses version 4.1.2 3) Tried on Android devices with OS version 6.0.1 and 5.1 – kalyan Mar 21 '17 at 12:45
  • An unknown server-side error occurred while processing the command. Original error: Process didn't end after 10000ms (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 21.44 seconds – kalyan Mar 21 '17 at 12:48
  • The appium log suggest it’s the chrome driver not up to date. I found this error in the log file. RESPONSE InitSession unknown error: Chrome version must be >= 53.0.2785.0 – kalyan Mar 22 '17 at 04:41