user3854548
user3854548

Reputation: 21

how to specify appium to one device only

I am automating an android device, my target is to automate everything and keep physical maintenance to a minimum. I have two devices with USB debugging on but, when I turn the appium server on it starts running code on the wrong device.

Is there a way to programatically specify which device appium sends code to?

Or is there a way to disconnect a specific adb device through command prompt?

Any help would be greatly appreciated, this is the last step in finishing my project. Thank you in advance.

Upvotes: 1

Views: 1856

Answers (1)

rcarba
rcarba

Reputation: 683

You can use the udid capability for that.

caps.setCapability("udid", "udidDevice");

You can find udidDevice using adb devices command on the terminal with both devices connected and get the one you are interested in.

Upvotes: 3

Related Questions