UI Automation

Capture user interactions and play them back with ease using Appetize's AppRecorder. Test and reuse app workflows (e.g. user login) on different devices effortlessly.

AppRecorder

Users can easily record and replay their interactions with our Appetize Devices using AppRecorder. These recordings capture the running application's user interface elements and are designed to handle minor app changes without any issues.

You can even record on one device, like an iPhone, and play it back on another device, such as an iPad.

We welcome customer feedback as we continue to refine our APIs, and the underlying technology powering our JavaScript SDK.

Recording Actions

With App Page

The app page provides an easy way to enable AppRecorder and logging out all of the user actions that took place. You can access this via your app's app link

https://appetize.io/app/{appId|buildId|publicKey}

or by going to your Apps page and clicking Play on the app you want to inspect.

Once you are on your app page, you can enable AppRecorder by toggling the button to on.

As you interact with the session, AppRecorder will automatically pick up all the actions and log them out in the AppRecorder tab.

These actions can then be exported to either JSON for playback later or to a Playwright test file for testing purposes:

With JavaScript SDK

When the user interacts with the device, the session will emit an action event:

const session = await client.startSession()

let actions = []
session.on('action', action => {
    actions.push(action)
})

// later on, replay them
await session.playActions(Actions)

Recorded actions can be serialized as JSON and stored so that you can replay them later.

Example of a
{
    type: 'click',
    xPos: 105,
    yPos: 645,    
    element: {
        text: 'Login',
        class: 'UIView',
        baseClass: 'UIResponder',        
    }
}

Playing Actions

With App Page

The app page makes it simple to turn on AppRecorder and import a JSON file with past user actions for replay. Just use your app's link to access and get started:

https://appetize.io/app/{appId|buildId|publicKey}

or by going to your Apps page and clicking Play on the app you want to play the actions on.

Once you are on your app page, you can enable AppRecorder by toggling the button to on.

To import the JSON file with the user actions to replay, select the "Import JSON" button in the AppRecorder tab and then select "Replay" to start a replay of the user actions that took place.

With JavaScript SDK

You can play an action on the device using session.playAction

await session.playAction({
   type: 'click',
   element: {
      text: "submit",
      accessibilityIdentifier: "submit_button",
      class: "UIView"
   }
})

Multiple actions can be played back using session.playActions

await session.playActions([
   {
      type: 'type',
      element: {
         accessibilityIdentifier: "email_field",
      }
   },
   {
      type: 'click',
      element: {
         text: "submit"
      }   
   }
])

See Touch Interactions for more information on how we match views and some best practices.

Programmatic Interactions

The device can also be interacted with programmatically through our JavaScript API.

Device commandsTouch interactions

UI Testing with Appetize

We offer a Playwright integration that uses our JavaScript SDK to test your apps.

Testing

Last updated