Work with browsers in automation scripts

This article provides best practices for working with browsers in automation scripts.

Open browser

To open a website, use the Browser open or Browser go to functions. 

The options for the Browser parameter are:

  • Default: Open the browser set as default on the device. Only works with visual analysis.

  • OS (recommended): Script can be run on either Safari or Android. 

    Safari for iOS 7.0 and later or Chrome for Android 7.0 or later. 

    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 and later.

  • Safari: For iOS 7.0 and later.

  • Perfecto: PM Browser. Use for devices running Android 4.1 and later or iOS 7.0 and later.

Close browser tabs

Android

If you are working with Android devices and the Chrome browser, the following options for closing the tabs are available:

  • Use the Browser go to function with the Browser parameter set to "OS". This will close all open tabs on the browser and navigate to the desired page.
  • Use the Browser clean function. Note that this function will close the tabs and clear all data on the browser. In addition, the "terms and conditions" page will display and must be accepted the next time the browser is opened.

iOS

When working with iOS, there is currently no method to close the iOS browser tabs directly.