Is it possible to add devices to known devices list (execute adb connect) via Appium java client?
Adb connect via Appium java client
No, it is not possible to add devices to the known devices list directly via the Appium Java client. it focuses primarily on automating interaction with mobile devices for testing purposes, rather than managing the devices themselves. To add devices to the device list in promt:
adb connect <device_ip_address>
in <device_ip_address> replace the IP address of the device you want to connect to. This command establishes a connection between your machine and the device over the network
i am getting list of connected devices to our macMinis:
// Android adb devices // iOS xcrun xctrace list devices // I use simple Java command as far as code executing on same machine where phones connected Runtime.getRuntime().exec(cmd).getInputStream();
After this I start tests with number of threads = devices I have.
You can also use https://appium.io/docs/en/2.0/guides/execute-methods/ to execute code on machine where Appium server runs and get output of terminal command.