Appium Setup for POS UI Automation Testing

Set up Appium and automate an app on a physical iPad using its bundle ID.

This section provides a comprehensive setup guide for configuring Appium to work with your iPad for POS UI automation testing. The setup process involves installing necessary tools, configuring Xcode, setting up WebDriverAgent, and configuring Appium Inspector. Follow each step carefully to ensure a successful setup.

Before setting up Xcode and WebDriverAgent, install required command-line tools and dependencies. These tools provide the foundation for iOS automation testing and ensure compatibility between your development environment and iOS devices.

Xcode is essential for iOS development and automation. It provides the necessary tools, simulators, and device management capabilities required to work with iOS devices and WebDriverAgent.

  1. Open the Mac App Store.
  2. Search for "Xcode" and install it if not already installed.
  1. Open Xcode from the Applications folder.
  2. Go to Window > Devices and Simulators.
  3. Ensure your iPad appears under the Devices tab.
  1. On your iPad, go to Settings > Privacy & Security.
  2. Scroll down and select Developer Mode.
  3. Turn on Developer Mode and allow your iPad to restart.
  1. Open Xcode on your Mac.
  2. Go to Window > Devices and Simulators.
  3. Select your iPad from the list of connected devices.
  4. Copy the UDID displayed for your iPad.
  1. In Xcode, select the WebDriverAgentLib target.
  2. Go to Signing & Capabilities.
  3. Select your development team from the drop-down list.
  4. Repeat steps 1-3 for the WebDriverAgentRunner and IntegrationApp targets.
  1. Select your connected iPad as the target device in Xcode.
  2. Choose the WebDriverAgentRunner scheme.
  3. Press Cmd + R to build and run WebDriverAgent on your iPad.

If the build-and-run process is not successful, try the following:

  1. Install the IntegrationApp by selecting it as the scheme and pressing Cmd + R.
  2. Execute a test of the WebDriverAgentRunner by selecting it as the scheme and pressing Cmd + U.

After the test is triggered, you can access the WebDriverAgent at the following URL:

mceclip1.png

mceclip2.png

mceclip3.png

  1. Open a terminal window.
  2. Run the following command:
  1. Go to the official Appium releases page.
  2. Download and install the latest version of Appium Inspector for your operating system.
  1. Open Appium Inspector.

  2. Configure the following settings:

    • Remote Host: localhost (use your device IP if necessary)
    • Remote Port: 4723
    • Remote Path: /
  3. Add the following desired capabilities:

    • platformName: iOS
    • platformVersion: (Your iPad's iOS version, e.g., 14.0)
    • deviceName: (Your iPad's name, e.g., iPad)
    • automationName: XCUITest
    • udid: (Your iPad's UDID)
    • app: (The bundle ID of the app you want to automate)
  1. Open Appium Inspector.
  2. Click on the Start Session button.
  3. The app specified by the bundleId should launch on the iPad.
  4. You should be able to inspect and interact with the app elements.

Here is an example of how the desired capabilities configuration should look in Appium Inspector:

mceclip4.png

Replace the placeholders with the actual values specific to your setup.