Sahi Pro - Multiple modes/application types


Multiple modes in a script

It is now possible to interact with multiple application types from the same script. The application types are BROWSER, ANDROID, ANDROIDBROWSER.
The appropriate mode needs to be set using _setMode and further steps will interact with that application type. BROWSER refers to Desktop Browser, ANDROID refers to Android Native, ANDROIDBROWSER refers to Android Browser.
A script can switch between different modes. Once the BROWSER mode is set, _launchNewBrowser is used to launch a new browser and _selectBrowser is used to select the particular browser to address the steps to.
In ANDROID mode, one would use _connectDevice to connect to a device and _selectDevice would be used to select the device.
In ANDROIDBROWSER mode, one would use _launchNewMobileBrowser to launch a mobile browser and _selectBrowser would be used to select the browser.
Once a browser, mobile browser or device has been launched/connected to, the script would only select the particular connection using the appropriate _selectZZZ API.
Refer to scripts in userdata/scripts/demo/android for usage examples.

Playback: Default Desktop Browser and Mobile Device options

Before running a script/suite, the user has to choose the Default Desktop Browser, and Default Mobile Device.

Playback: Start With option

The user also has to choose the mode in which to start the script. As of now, the options are Desktop Browser, Mobile Browser, Mobile Device and Generic.
Mobile Device refers to Mobile Native.

Notes on Default and Start With options