Release Add direct activity navigation for UiAutomator2; fix subtle bugs · sbabcoc/Selenium-Foundation (original) (raw)
The primary objective of this release was to add the ability to open Android activities directly with UiAutomator2. This feature is quite straightforward with Espresso but required the use of Appium's mobile: shell script for UiAutomator2. To facilitate a broader range of options, I added action and category properties to the PageUrl annotation.
In the process of implementing this new feature, I discovered a few subtle bugs that heretofore had gone undetected.
- I had used the Xpath selector
/*to select the first element of a page for refresh detection. This worked for web applications, but caused failures on Android applications if RemoteWebDriver was used instead of AndroidDriver. I switch to using//*instead, which works even with RemoteWebDriver. - A dependency declaration issue had caused the code to fall back to RemoteWebDriver because the
java-clientartifact was only being included intestscope.