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”
Hi, Nice Article.Thanks for sharing. This Website’s UI is also Good.Please continue with your Great Work..!!.
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!
Hi, Nice Article.Thanks for sharing. This Website’s UI is also Good.Please continue with your Great Work..!!.
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!
Unable to launch chrome browser can anyone please help me