Automating the Android calculator

We are going to write a basic automation script that will enable us to perform some sums with the build in Android calculator. The first thing we are going to do is configure BasePageObject that all future page objects can extend as we did in our Selenium framework:

package com.masteringselenium.page_objects;import com.masteringselenium.AppiumBase;import io.appium.java_client.AppiumDriver;import io.appium.java_client.TouchAction;import org.openqa.selenium.support.ui.WebDriverWait;public abstract class BasePageObject {    AppiumDriver driver;    WebDriverWait webDriverWait;    TouchAction touchAction;    BasePageObject() {    try {    this.driver = AppiumBase.getDriver();        } catch (Exception ignored) { //This will be be thrown ...

Get Mastering Selenium WebDriver 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.