ExecuteAutomation

Writing first Appium code with Java

In the last post we discussed how to set the stage ready for appium, in this post we will start writing a simple code by Here is the complete code
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, "Android Emulator");
		cap.setCapability(MobileCapabilityType.APP_PACKAGE,
				"com.example.calculator");
		cap.setCapability("avd", "Test");

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

	}

	@Test
	public void SimpleTest() {
		Assert.assertNotNull(driver.getContext());
         }
}
Here is the complete video of the above discussion. 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