Appium: Locating Elements. Automating Task app
If you found this video useful please consider subscribing and/or donating using the links below.
** Android Studio (with ADB tools as part of it) **
https://developer.android.com/studio/index.html
** IntelliJ IDEA **
https://www.jetbrains.com/idea/
** Appium Server (Win, Mac, Linux) **
https://github.com/appium/appium-desktop
** Tasks app that I used in this Video Tutorial **
APK: https://apkpure.com/tasks-todo-list-task-list-reminder/com.tasks.android/download?from=details
Same app in Play Store: https://play.google.com/store/apps/details?id=com.tasks.android&hl=en_US
Note: Appium has it's own Layout Inspector built-in too
** Maven Dependencies: **
https://mvnrepository.com/artifact/io.appium/java-client
https://mvnrepository.com/artifact/org.testng/testng
** Full Code of TestPlan.class **
public class TestPlan {
private static AndroidDriver driver;
@BeforeSuite
public static void setUp() throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.VERSION, "8.1.0");
capabilities.setCapability(MobileCapabilityType.UDID, "emulator-5554");
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "60");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android SDK built for x86");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "ANDROID");
capabilities.setCapability(MobileCapabilityType.ORIENTATION, "PORTRAIT");
capabilities.setCapability(MobileCapabilityType.APP, "[PATH TO YOUR APP");
capabilities.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,true);
driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
}
@BeforeMethod
public void setUp(){
driver.resetApp();
}
@Test
public void clickAppButtons(){
driver.findElement(By.className("[CLASS NAME HERE]")).click();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.findElement(By.id("[ID OF ELEMENT HERE")).click();
}
@AfterMethod
public void tearDown(){
driver.closeApp();
}
** IntelliJ IDEA: WebDriver Web Testing with Page Objects in 15 minutes **
https://www.youtube.com/watch?v=rirMN72XDr0
** How to recover a Linux installation on Mac **
https://www.youtube.com/watch?v=C1b1aJh_LSQ
** How to boot alternative operating systems on Mac **
https://www.youtube.com/watch?v=C5G9tr1JS_Y
** Choosing a Linux distro for Mac **
https://www.youtube.com/watch?v=Ai9sguTbUD0
** Mac OS 9 and iMac G4 Review **
https://www.youtube.com/watch?v=cu7h9tIofxA
** React OS 0.4.13 on Bare Metal. Windows Alternative? **
https://www.youtube.com/watch?v=aDeS7gEmRzw
** Linux Tools for your Mac. Package Management **
https://www.youtube.com/watch?v=gBjKJkgmvFQ
** iMac 2008 SSD upgrade in 2020. Is it EASY? **
https://www.youtube.com/watch?v=afhDuGzRceo
Thank you a lot!
💰 Support me (for NEW videos!):
https://www.patreon.com/nomadicdmitry
https://www.buymeacoffee.com/nomadicdmitry
🏡My website:
http://www.trvlforever.com
👉Sign up for Airbnb and get a bonus for your perfect getaway - https://www.airbnb.com/c/dmitryy429
🚗Sign up and drive for:
Uber https://goo.gl/gJX6g9
Lyft https://goo.gl/MnYzhV
📚My Medium articles:
💻Who is responsible for quality of software testing - https://medium.com/@nomadic.dmitry/who-is-responsible-for-the-quality-of-application-testing-cef91db32f74
🎴Relax. Travel doesn't solve any of your problems - https://medium.com/@nomadic.dmitry/relax-travel-doesnt-solve-any-of-your-problems-ff5e4dcf77e3
🗺How location independence changed my mindset - https://medium.com/@nomadic.dmitry/how-location-independence-changed-my-mindset-4ea95ab6c2b1
👎The power of saying "No" - https://medium.com/@nomadic.dmitry/the-power-of-saying-no-b164e0fa40d9
🗺3 rules for following nomadic travel dream - https://medium.com/@nomadic.dmitry/3-rules-for-following-a-nomadic-travel-dream-511d5cb23c1c
😉Why being yourself is the best thing you could do - https://medium.com/@nomadic.dmitry/why-being-yourself-is-the-best-thing-you-could-do-cdbbb66f5d4
💻Android Automation. Simple Espresso tutorial - https://medium.com/@nomadic.dmitry/android-automation-a-super-simple-guide-to-create-your-first-espresso-test-395963c77a40
👉My Website articles:
🏡How to book Airbnb Apartments for a best price - http://trvlforever.com/book-airbnb-best-price/
🏕Nomad challenges when living in the vehicle - http://trvlforever.com/vanlife-nomad-challenges/
🌎I love Nevada and it's not only about Las Vegas -
http://trvlforever.com/i-love-nevada-and-not-only-vegas/
🔖Most important words for your trip to Mexico -
http://trvlforever.com/spanish-words-for-travel/
💸How to travel like a king on a low budget - http://trvlforever.com/low-budget-travel/
#Appium #TestAutomation #Java