Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions Introduction to Appium Native app Mobile Web app Hybrid app Appium architecture XCUITest UiAutomator 2 Pros of using Appium Summary Setting Up the Machine Machine setup for macOS Installing Java Installing Android SDK (using the Android command-line tool) Installing Android SDK (using Homebrew) (Optional) Creating Android Virtual Device (Optional) Genymotion emulator Debug help Installing Appium Installing Appium server (From Source) (Optional) Selecting IDE App under test Machine setup for Windows Installing Java Installing Android SDK (using Android command-line tool) Installing Node JS Installing Appium Installing Appium server (via npm) Installing Genymotion Selecting IDE Appium GUI app Summary Writing Your First Appium Test Creating an Appium Java project (using gradle) Introduction to Cucumber Writing our first Appium test Running the feature file Refactoring Implementing the remaining steps Running the scenario Automating a mobile web app using Appium Implementing the remaining steps Automating the iOS app using Appium Build the app Deploying the app on the iOS Simulator Via xcrun command Using Appium Generating Boilerplate code for iOS Summary Understanding Desired Capabilities Refactoring -1 Server argument Refactoring -2 Server capabilities Refactoring -3 Android-only capabilities Refactoring -4 iOS-only capabilities Summary Understanding Appium Inspector to Find Locators Appium inspector Implementing the other steps UI Automator Viewer Debugging mobile web apps using Chrome Inspect Summary How to Synchronize Tests AppiumDriver Implicit wait Explicit wait Fluent wait Summary How to Automate Gestures Gestures TouchAction MultiTouch Scroll Swipe Orientation Summary Design Patterns in Test Automation Refactor -1 Page Object pattern Refactor-2 Assertions Implementing assertions in Page Object Implementing assertion in test script Avoiding dependencies between tests Introducing set up and tear down Summary How to Run Appium Test on Devices and Emulators Emulator Running test on the Genymotion emulator Devices Running a test on actual Android devices Running a test on actual iOS devices Summary Continuous Integration with Jenkins Refactoring -1 Setting up Jenkins Moving a project to Git Adding Jenkins plugin Setting up the Jenkins task Viewing reports in Jenkins Summary Appium Tips and Tricks Switching between views - web and native Taking screenshots Recording video execution Interacting with another app Running the test in parallel Network conditioning Summary Appium Desktop App Installing the new Appium app Starting a simple server Start New Session Attach to an existing session Desired Capabilities Appium Inspector Starting the server with advanced options Appium Endpoints Summary Appendix Introduction to Cucumber How does Cucumber work? Feature Scenario Background Scenario Outline Hooks in Cucumber Running Cucumber CLI Runner JUnit Runner Third-Party Runner (Via IntelliJ) Finding an app's package name and launch activity Using the ManifestViewer app Using the Appium GUI app Installing Google Play services in the Genymotion emulator Summary