Below are the steps to configure android device:
- Download and extract android sdk ( note : sdk folder and adkmanager should be in the same folder eclipse is extracted in selproject folder)
- Install android ADT plug in for Eclipse.Go to help menu in eclipse --> install new software --> add -->enter the name : ADT and url: https://dl-ssl.google.com/
android/eclipse/ after restart specify the sdk path ( usually---- drive:\seleniumprojectfolder\ sdk) - Attach the device (android device,,, mobile / tablet /ipad..etc)
- Install the WebDriver APK, type the command : adb devices in the below folder to get serial id of the device
- We need to retrieve the serial id with the following command: /android_sdk/platform-tools/
adb devices - Download the Android server from http://code.google.com/p/
selenium/downloads/list and save it in the platform-tools directory. To install the application enter: $./adb -s <serialId> -e install -r android-server.apk - Start the Android WebDriver application,by running this command: $./adb -s <serialId> shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.
app/.MainActivity - Now we need to setup the port forwarding in order to forward traffic from the host machine to the emulator. Enter the following in the terminal: $./adb -s <serialId> forward tcp:8080 tcp:8080
- Write selenium script in eclipse and run. The script should run on the device