Appium Tutorial: Connecting your Android Devices via USB for testing Native and Hybrid Apps
Most of the time when we test Native and Hybrid Android apps via Appium, we need to connect our real device through USB to a machine. In this example we will see how we can connect our ADB device via Wifi connection.
- Make sure initially the Android device is connected via USB Cable to the machine
- Correct USB drivers are installed and the device is discoverable. Enter adb devices in cmd prompt and check if you device shows up.
- Make sure both Device and Machine are on same Wifi
- Run the cmd:
? adb tcpid 5555
- Now disconnect your device
- Get the IP Address of you Android device
- Run the following command to configure adb on you device via Wifi
- Open command prompt and type:
- Make sure the device is discoverable over the wifi network
- Execute and run your test