I want to use Appium to automate the scenario below on Android
It seems that the problem is related to changing from the webview context to the native app's own context. This is done in Java by using the command
To view all available contexts use
driver.getContextHandles();, which returns a
Set<String> with all available contexts.
Native context is always called "NATIVE_APP" and webviews usually are indexed as "WEBVIEW_0", "WEBVIEW_1" and so on.
All interactions to the app that are not related to a webview directly, will usually need to be done while in "NATIVE_APP" context.