Configuring AndroidDriver in Eclipse
1- Download Android server apk from this URL https://code.google.com/p/selenium/downloads/list
2- Download android SDK from this locationhttp://developer.android.com/sdk/index.html
3- Unzip it in some location like C:/SDK
4- You will see three folder ther
- Eclipse
- SDK Manager.exe
- sdk
Like this
Here you can use the eclise from here and so no need to configure here in eclipse it is already there in eclipse
Now you need to Create Android Virtual Device
Go to Window >>AVD Manager>>or5- Avd can also be created by command lineBut for that you need to reach to the directory path of <sdk> toolsso open you Command prompt write this line (as my tools is present at this location)
cd C:androidadt-bundle-windows-x86sdktools
now write this line
android create avd -n my_android -t 14 -c 512M
now write this line
android create avd -n my_android -t 14 -c 512M
Here -n stands for specification of the avd name
-t is used here for It specifies the platform target. Use the android list targets command to get the list of platforms available with the SDK.
-c targets to SD card in mobile
-t is used here for It specifies the platform target. Use the android list targets command to get the list of platforms available with the SDK.
-c targets to SD card in mobile
6- Lauching emulator
- a. By using command line (navigate to platform tool location)emulator -avd my_android &
- b. By using manuallyWindow >>Android Virtual Device Manager >> select already created AVD and click on start
7- Finding device id (I am assuming that we are in platform-tools directory on CMD)
write this command in CMDadb devices By default it will give id like this emulator-5554
8- Now copy your androidDriver apk and place it in platform-tools folder
write this command in CMDadb devices By default it will give id like this emulator-5554
8- Now copy your androidDriver apk and place it in platform-tools folder
9- Now installing the apk in newly created AVD(assuming that we are in platform-tools directory in cmd)adb -s emulator-5554 -e install -r android-server-2.21.0.apk
10- Starting Android-server (assuming we are in platform-tools directory on CMD)adb -s emulator-5554 shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.app/.MainActivity -e debug true
11- Setting up the port forwarding in order to forward traffic or script injection from local machine to emulator
adb -s emulator-5554 forward tcp:8080 tcp:808
But if you want to install plug-in of Android WebDriver in to your eclipse
Steps:
Steps:
1- Go to Help>> Install new software >> Add
https://dl-ssl.google.com/android/eclipse/
https://dl-ssl.google.com/android/eclipse/
and Follow the instruction and finally you would be able to configure the Android WebDriver plugin in Eclipse.