Mobile WebDriver Testing

You can perform object-based testing of Android and iOS devices with Eggplant Functional using WebDriver functionality. For Android devices, this requires the installation and configuration of Appium and other components. For iOS devices, WebDriver testing requires iOS Gateway 5.1.2 or later. Use mobile WebDriver commands and functions to perform tests.

New Feature: Mobile device testing using WebDriver is available in Eggplant Functional 18.1.2 and later.

IOS Testing Setup

WebDriver testing of iOS devices requires iOS Gateway 5.1.2 or later. After you install and launch iOS Gateway, plug in the iOS device you want to test, start automation, then create a connection using mobile WebDriver commands and functions. Make sure the Auto Start WebDriverAgent is selected in iOS Gateway.

Android Testing Setup

Performing WebDriver testing on Android devices requires the installation and configuration of several pieces in addition to Eggplant Functional:

  • Java SE Development Kit (JDK) 10.0.2 or later
  • ADB 3.1.3, part of Android Studio
  • Appium 1.6.3 or later

Depending on the devices you're testing, you might also need Android USB drivers, which are manufacturer-specific and can be installed as needed.

Java Development Kit

Download the JDK, and install using the default settings.

Android Studio

  1. Download Android Studio. Use standard installation settings, and allow the installer to download components.
  2. When the installation is complete, click Configure > SDK Manager from the Android Studio splash screen.

    The Configure option on the Android Studio splash screen

  3. Select Appearance and Behavior > System Settings > Android SDK in the left menu, then click the SDK Tools tab. Select the SDK Build-Tools, SDK Platform-Tools, Android SDK Tools, and Google USB Driver checkboxes (Windows only). Click OK.

    The Default Settings window in Android Studio

Note: If you're using a virtual machine, clear the HAXM installer checkbox.

Appium

  1. Download and install Appium 1.6.3 or later. Use the default installation settings.
  2. Open Appium.
  3. Click Edit Configurations to enter Environment Variables. These variables, ANDROID_HOME and JAVA_HOME, are the paths to the Android SDK folder and the jdk folder on your system. You can find the ANDROID_HOME path on SDK Tools page in Android Studio. The JAVA_HOME path typically is C:\Program Files\Java\jdk-10.0.2.
    Note: You do not need to set the JAVA_HOME path on Mac.
  4. Click Start Server to launch the Appium server.
  5. Click the magnifying glass icon in the server window. A new Appium window opens with the Automatic Server tab active.

    Configure testing on Android devices in the Automatic Server tab

  6. Configure testing of a specific app on a specific device in the Desired Capabilities area. Use the plus (+) button and fill in the UI fields on the left of the screen. You must create a capability set for every device/app combination that you want to test. Capability sets include the following parameters:
    • platformName: Android
    • deviceName: Android
    • device: The serial number of the device. You can find this by either entering adb devices at the command prompt or by opening Android Gateway with the device connected.
    • appPackage: The identifier of the mobile app that you want to test. This parameter is case-sensitive.
    • appActivity: The screen in the app that you want the app to open on. This parameter is case-sensitive.
    • AutomationName: The automation engine to use to test the device.
  7. Save your settings. If you haven't plugged in an Android device yet, do so now and click Start Session. Appium installs drivers on the device that are required for testing with Eggplant Functional.

    Appium installs drivers required for testing with Eggplant Functional

  8. Close the driver installation window, but keep the Appium server running. You're now ready to create a connection and automate the device using mobile WebDriver commands and functions.

 

This topic was last updated on 2月 01, 2019, at 11:13:23 午前.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant