Clear Browser History in Mobile Chrome on Android
I'm executing a test on Mobile Browser and need to delete browser history/cache in the beginning.
I'm using WebUtil.LaunchBrowserById method to connect to the device and open the browser (Android device, Chrome Browser).
Using Browser("xxx").ClearCache or Browser("xxx").DeleteCookies DOESN'T WORK.
So far I've found the following options to clear the history:
1. Use 'Device' object
Automated clicking in Chrome on 'More Settings -> Advanced -> Privacy -> Clear browsing data
This solution however means that I need to connect to the device using MobileUtil.SetActiveMobileDeviceByID, which is then causing problems with WebUtil.LaunchBrowserById (the browser objects are no longer recognized)
2. Use Chrome URLs
Either 'chrome://chrome-urls/' or directly 'chrome://history'.
This solution is better for me because I can use my WebUtil method to connect to device and all my objects are recognized.
However, the problem is that when I type Browser("xxxx").Navigate "chrome://history" then the colon character (:) is skipped and the navigation fails.
How can I force UFT to navigate to "chrome://history"??
Thanks a lot,