Hello,
I am testing the native Android app with appium and uiautomator2.
During the test I have to open some url in Chrome browser and I need to make sure that page was fully loaded.
It seems that all elements are visible (they can be found), but there is still Chrome progress bar under the url bar, which indicates that page was not fully loaded yet.
Is there any way how to check that it was fully loaded?
Thank you
Probably I found the way finally.
Since I start the test in the native app and then I open the page in Chrome by something like
executeScript "mobile: shell am start -a android.intent.action.VIEW -d <url> -n com.android.chrome/com.google.android.apps.chrome.Main"
I can check the context handles by
Set<String> contextNames = driver.getContextHandles();
See Automating hybrid apps
I noticed that while the Chrome progress bar is still visible the contextNames set does not contain WEBVIEW_chrome yet.
So I add waiting until
driver.getContextHandles()).contains("WEBVIEW_chrome")
It may help also somebody else:slightly_smiling_face: