While testing in , a change of from NATIVE to is expected. But, the name of the context does not remain same at all instance of testing. However, it is one of the follwing:

WEBVIEW_undefined

WEBVIEW_{package_name_of_application_under_}

Say, I’m testing a Hybrid app with package name

com.webviewbrowser

In this case, the context name of the WEBVIEW switches randomly between the following two at every instance

WEBVIEW_undefined

WEBVIEW_com.webviewbrowser

When I use the following in my code,

driver.context("WEBVIEW_com.webviewbrowser")

Miserably, I actually receive the context name WEBVIEW_undefined sometimes and NosuchContextException is thrown.

Why does this happen even when no other app is running at the time of testing?

How do I get rid of this issue?



Source link https://sqa.stackexchange.com/questions/25188/different-context-name-for-webview-in-hybrid-android-app-test-through-appium

LEAVE A REPLY

Please enter your comment!
Please enter your name here