---
schema_version: "1"
id: 6b0b8adbaaf7d892ac42c26b9ac5de5168c241fd05d2b15debb31cac18fe194e
title: Appium Setup for POS UI Automation Testing
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/guides/appium-setup-for-pos-ui-automation-testing.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/guide/appium-setup-for-pos-ui-automation-testing.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5d42156dd7e6a07171dd2cc525abd5bf7f5cbe5e8043a4af98ebabab05c3d068
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
# Appium Setup for POS UI Automation Testing

Set up Appium and automate an app on a physical iPad using its bundle ID.

## Configuration & Setup

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 make sure the setup is successful.

### Install Required Tools

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.

#### Install Homebrew

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

#### Install Node.js and npm

```bash
brew install node
```

#### Install Appium

```bash
npm install -g appium
```

#### Install Appium Doctor

```bash
npm install -g appium-doctor
```

#### Install Carthage

```bash
brew install carthage
```

#### Install iOS Deploy

```bash
brew install ios-deploy
```

#### Verify iOS Deploy Installation

```bash
ios-deploy -c
```

### Setup Xcode

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.

#### Install Xcode

1. Open the Mac App Store.
2. Search for "Xcode" and install it if not already installed.

#### Verify Xcode Installation

1. Open Xcode from the Applications folder.
2. Go to **Window** > **Devices and Simulators**.
3. Make sure your iPad appears under the **Devices** tab.

#### Enable Developer Mode on iPad

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.

#### Obtain iPad's UDID

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.

### WebDriverAgent

#### Clone the WebDriverAgent Repository

```bash
git clone https://github.com/appium/WebDriverAgent.git
```

#### Navigate to WebDriverAgent Directory

```bash
cd WebDriverAgent
```

#### Bootstrap Carthage

```bash
carthage bootstrap
```

#### Open WebDriverAgent in Xcode

```bash
open WebDriverAgent.xcodeproj
```

#### Configure Signing for Targets

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.

#### Build and Run WebDriverAgent on the iPad

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.

#### Troubleshooting

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`.

#### Access WebDriverAgent

After the test is triggered, access the WebDriverAgent at the following URL:

```bash
http://<your device IP>:8100/
```

![mceclip1.png](https://developer.salesforce.com/docs/media/retail-cloud/mceclip1.png)

![mceclip2.png](https://developer.salesforce.com/docs/media/retail-cloud/mceclip2.png)

![mceclip3.png](https://developer.salesforce.com/docs/media/retail-cloud/mceclip3a.png)

### Start Appium Server

1. Open a terminal window.
2. Run the following command:

```bash
appium
```

### Configure Appium Inspector

#### Download and Install Appium Inspector

1. Go to the [official Appium releases page](https://github.com/appium/appium-inspector/releases).
2. Download and install the latest version of Appium Inspector for your operating system.

#### Launch Appium Inspector and Configure Desired Capabilities

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, for example, `14.0`)
   - **deviceName:** (Your iPad's name, for example, `iPad`)
   - **automationName:** `XCUITest`
   - **udid:** (Your iPad's UDID)
   - **app:** (The bundle ID of the app you want to automate)

### Verify Setup

#### Start a New Session in Appium Inspector

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.

#### Example Configuration for Appium Inspector

Here is an example of how the desired capabilities configuration should look in Appium Inspector:

```json
{
  "appium:deviceName": "PS API iPad",
  "platformName": "iOS",
  "appium:platformVersion": "17.5.1",
  "appium:automationName": "XCUITest",
  "appium:app": "com.psstore.beta.ios",
  "appium:udid": "00008030-000A69C92EA3C02E",
  "appium:xcodeSigningId": "iPhone Developer"
}
```

![mceclip4.png](https://developer.salesforce.com/docs/media/retail-cloud/mceclip4a.png)

**important:** Replace the placeholders with the actual values specific to your setup.
