1

While running automated UI tests with multiple workers I would like to execute the following script:

    beforeAll(async () => {
    if (device.getPlatform() === 'android') {
      console.log('*** disable android system popups ***')
      execSync(
        'adb shell settings put secure immersive_mode_confirmations confirmed'
      )
    }
    await device.launchApp()
  })

This will not work since the shell does not know which emulator to target.

Command failed: adb shell settings put secure immersive_mode_confirmations confirmed
adb: more than one device/emulator

Is there a way to simply target all the emulator instances at once with the same command? OR can I somehow access the adb devices list with JS and maybe map the command to each instance?

Zoltan Szokodi
  • 396
  • 1
  • 2
  • 11

0 Answers0