In one of the previous Appium Tutorial we learnt How to Connect Android Device with PC through USB. In this tutorial I will show you How to Connect Android Device with PC through Wifi.
Appium has a lot of good features and one of them is connecting devices on Wi-Fi & do parallel execution. Usually, you connect your device with USB & start execution but sometimes when you want to put your main server at one location & all the devices to another location, here you will be needing a wireless connection of devices.
Pre-Requisite:
- Android SDK Should be installed on machine. Click to see How to install Android SDK.
- Android SDK Packages should be installed. Click to see What all SDK Packages to Install.
Steps to Connect Android Device with Windows PC using WIFI
1) Open Command Prompt & Go to the Android SDK -> SDK -> Platform Tools directory.
Note: Location of Platform Tools can differ it can be found just under the Android SDK.
2) Now connect your Device to Computer with USB & then type command – adb devices to know the Device Id.
3) Type command adb –s <device id> tcpip 5555. This command will help to start device on tcp-ip port.
4) Disconnect device from USB and run command adb connect <Device internet IP address>. (Device should be connected over same Wi-Fi)
Now device is ready to use over Wi-Fi. You have to use <Device Internet IP Address:5555> as Device Id. In the same manner, many devices can be connected on Wi-Fi & parallel execution can be started.
How to find the IP Address of Android Device
- On Android, you can find this information in the Settings app. Pull down from the top of the screen and tap the gear icon or open your app drawer and tap the “Settings” app icon to open it.
- Tap the Wi-Fi option under Wireless & networks, tap the menu button, and tap Advanced to open the Advanced Wi-Fi screen. You’ll find the IP address and MAC address displayed at the bottom of this page.As always on Android, these options may be in a slightly different place depending on how your manufacturer customized your device.