Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Android: how to start a script on more than one device?

How to start over ant script on more devices or emulators?

Best Answer

  • edited September 2019 Answer ✓
    Hi Duka,

    Please follow the steps below to run the scripts on multiple devices/emulators in parallel.

    - Get the device ids of all the devices using 'adb devices'
    - Edit the <SahiPro>/userdata/config/android_device.xml like below.
    		<displayName>Moto E5</displayName>
    		<displayName>Moto G5</displayName>

    - Here, please make sure that you have the same name in <name> tag. Ex. motorola in this case and deviceid should be of different devices Ex. c7e6dd41 and ZF6222MNMD

    Save the changes, restart Sahi.

    Now, create the suite of scripts which are intended to run on the android device. Please make sure that you have not hardcoded the device id in the script.
    _connectDevice();  //no hardcoded device id.

    - Open the suite in Sahi Pro Script Edtior
    - Click on Playback option and select 'motorola' device in Android Device. Keep threads to 2 or more
    - You can directly run the script or you can create an ant targets and run the suite.

    Please let us know if you face any issues, you can mail to support at sahipro dot com


Sign In or Register to comment.