Use Selendroid to Test Mobile Web Application on Mobile Device
To assure the quality of mobile web application, we need to test mobile web application on real mobile devices instead of testing it on mobile emulator. This example teaches you how to test mobile web application on android mobile device.
Verify that users are able to search merchandise on Ebay mobile web site.
Step 1: navigate to http://m.ebay.com
Step 2: type in android in the search box
Step 3: click on search button or press enter.
Step 4: assert that the website returns number of android merchandises.
Automation Test Implementation
Step 1: create a Java project named "SeleniumMasterMobileTest", add a package named "com.seleniummaster.mobiletest", and add a JUnit test class named "MobileWebTesteBayMobile.java". Make sure that in the build path, you referenced all required libraries as well as the Selendroid web driver library "selendroid-standalone-0.9.0-SNAPSHOT-with-dependencies.jar".
Step 2: write the following code in the MobileWebTesteBayMobile.java class.