1

I've got two AVDs with different names and when I launch application in Appium Inspector, pointing in Capabilities to specific AVD, then may also run in second AVD which is reserved for other purpose.

3 Answers3

1

There is a capability named avd which takes in avd name. It will automatically start the emulator for you.

You can also use avdLaunchTimeout to wait for emulator to launch and avdReadyTimeout to wait for emulator to get ready.

Try this out. Also, you don't need udid for connecting to AVD.

Wasiq Bhamla
  • 949
  • 1
  • 7
  • 12
0

First find the udid of your emulator. To find the device udid, open command prompt and type:

adb devices

It will list the udid of you connected devices.

Then you need to add the udid in DesiredCapabilities

DesiredCapabilities caps = new DesiredCapabilities();
// others caps
caps.setCapability("udid", "your device udid");
Suban Dhyako
  • 2,436
  • 4
  • 16
  • 38
0

Go to command prompt and type "adb devices" to get the udid of the AVD of the emulator you are using and then add that udid in DesiredCapabilities.

DesiredCapabilities capability = new DesiredCapabilities();

capability.setCapability ("udid", "your device udid");

Hope this helps.

Nauman Malik
  • 188
  • 8