Warning: fopen(/tmp/SghXTngBZPli-bxITtF.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139
Warning: unlink(/tmp/SghXTngBZPli-bxITtF.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
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
Writing the desired capability
Writing simple code to check if the application is opened.
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
Post Author:
Karthik kk
One Reply to “Writing first Appium code with Java”
@karthik,
I tried samething but it didnot work for me. Can you please help me with a skype call..?
@karthik,
I tried samething but it didnot work for me. Can you please help me with a skype call..?