Web Tests on Mobile Browsers

With a simple import change and a configuration update, you can use your existing Playwright tests to also do native browser testing with the Appetize integration

Prerequisites

Before you begin, make sure you have the following:

Configuration

If you haven’t set up Appetize with Playwright yet, we recommend look at our Getting Started guide. After successfully integrating Appetize, open the playwright.config.ts file to configure the settings for your desired device for native browser testing. If you are already using Playwright for web testing, you can easily add a new project as shown below.

For the buildId, we suggest using your device's sandboxarrow-up-right ID, which can be found in the URL bar. Look for the identifier that starts with standalone_*** and use that as your buildId. Here’s an example configuration:

{
    name: 'Appetize Native Browser Test',
    use: {
        config: {
                device: 'pixel7',
                osVersion: '13',
                publicKey: 'standalone_***',
                enableAdb: true
        }
    }
}

Page Fixture

The Appetize integration overrides the default page fixture to automatically determine when to use a standard browser (e.g., Chrome or Firefox) versus a native device browser for testing. This means all the logic is handled for you, simplifying the testing process.

Update your imports

To get started, simply update your imports. Change your Playwright import for test to the Appetize version:

From:

To:

Run your tests

Running Testschevron-right

Last updated