Last updated: Sep 13, 2017 10:30
Best practices for working with browsers in automation scripts
The options for the Browser parameter are:
- Default – open the browser set as default on the device. Only works with visual analysis.
- OS – Recommended Option. Script can be run on either Safari or Android.
Safari for iOS >7.0, Chrome for Android >7.0.
Select the OS option to use the real DOM on native browsers. When using this option, the system will ensure that only one tab is opened.
- Chrome - for Android > 4.1
- Safari - for iOS > 7.0
- Perfecto Mobile – PM Browser. Use for Android devices operating system < 4.1 and iOS operating systems <7.0.
Close Browser Tabs
If you are working with Android devices and the Chrome browser, there are two options for closing the tabs.
- Use Browser go to function with the Browser parameter set to "OS". This will close all of the open tabs on the browser and navigate to the desired page.
- Use the Browser Clean function. Note that the browser clean function will not only close the tabs but it will also clear all of the data on the browser and the "terms and conditions" page will display and must be accepted the next time the browser is opened.
When working with iOS, there is currently no method to close the iOS browser tabs directly. It is possible to clear the Safari browser cache.