Site Loader
Auckland, New Zealand
In this post we will start our discussion to automate Android web application using Appium. For automating a mobile web application, we need to first set the
  • Desired capability
  • Identify the control (elements of UI)
  • Write the code to perform operation
Here is the complete code for the above discussion.
public class FirstAppiumTest {

	// Create instance for Appium Driver
	AppiumDriver driver;

	@BeforeClass
	public void Setup() throws MalformedURLException {

		DesiredCapabilities cap = new DesiredCapabilities();
		cap.setCapability(MobileCapabilityType.DEVICE_NAME, "donatello");
		cap.setCapability(MobileCapabilityType.Browser,	"Browser);

		driver = new AndroidDriver(new URL(
				"http://127.0.0.1:4723/wd/hub"), cap);

	}

	@Test
	public void SimpleTest() {

		// Navigate to google.cocm
		driver.get("http://www.google.com");
		// Search 
		driver.findElementByName("q").SendKeys("execute automation");
		// Click button 
		driver.findElementByName("btnG").click();
	}
}
Please find below the complete video of the above discussion and the code Thanks for reading the post and watching the video !!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK

Post Author: Karthik kk

3 Replies to “Automating web apps using Appium”

  1. Hi, Nice Article.Thanks for sharing. This Website’s UI is also Good.Please continue with your Great Work..!!.

  2. Hi Karthik,

    I need your help on uploading document in mobile web browser.
    The scenario is: in mobile chrome browser,when i click on ‘Browse’ button, ‘Choose an action’ popup will be opening which is android/native popup. That popup has options such as Camera, Camcorder and Documents icons. I need to click ‘Documents’ in the popup and select the file to upload. Can you please help me on this.?
    Thank you in advance!

Leave a Reply to Raviprasad S Cancel reply

Your email address will not be published. Required fields are marked *