Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Learn how to run and debug tests using Playwright UI mode. Explore its interactive interface to efficiently execute tests, debug, and analyze results.

Kailash Pathak
January 11, 2026
In Playwright, you can run tests using headed and headless modes. In the earlier versions of Playwright, running tests in headed mode was somewhat challenging. To improve the headed mode experience, Playwright introduced UI mode in version 1.32.
Playwright UI mode provides a visual interface for running and debugging tests. It allows you to inspect elements, step through tests interactively, and get real-time feedback, making troubleshooting more intuitive.
In this blog, we look at how to use Playwright UI mode to run and debug tests.
Playwright UI mode is an interactive feature that allows you to run, inspect, and debug tests in a visually intuitive environment.
With UI mode, users can see exactly what’s happening on their website during test execution, making it easier to identify issues and improve test reliability. This interface brings a visual and user-friendly approach to testing, which contrasts with the traditionally code-centric methods of automation testing.
Key Benefits:
Note: Run Playwright headed tests across 50+ real browsers. Try TestMu AI Today!
The screenshot shows the Playwright UI mode, which provides a graphical interface for running and debugging Playwright tests.

Let’s break down each component in detail:
Now, let’s look at how to set up UI mode in Playwright:
npm install @playwright/test@1.32
npm init playwright@latest
npx playwright test --ui

// @ts-check
const { test, expect } = require("@playwright/test");
test("Open the site , verify the title, and fill data in the fields", async ({
page,
}) => {
await page.goto("https://www.lambdatest.com/kane-ai");
await expect(page).toHaveTitle(/Kane AI - World's first AI E2E Testing Agent/);
await page.locator('section').filter({ hasText: 'KaneAI - Testing' }).getByRole('button').click();
await page.getByRole('textbox', { name: 'First Name*' }).fill('KaneAI')
await page.getByRole('textbox', { name: 'Last Name*' }).fill('Automation')
});

Now let’s look at different UI mode features offered by Playwright and how you can use them:
You can filter the executed test script by text or @tag. Also, With the status ‘passed,’ it will display only the passed test cases. Status with ‘failed’ will display all failed test cases, and the status ‘skipped’ will display if there are any skipped test cases during the execution.
Additionally, you can filter by the project (Chromium, Firefox, and WebKit) and display test cases that are executed in respective browsers.

The Pick Locator feature in Playwright UI mode assists in identifying locators for elements on a webpage. To capture the locator of a specific field, simply click on the circle icon (as shown in the screenshot) and hover over the desired field. This will highlight and display the corresponding locator for easy selection.

In the Actions tab, you can see all the actions we have performed against a particular test. When you hover over each command, you can see the change in DOM on the right side.

In the Metadata tab, you can see the details about the particular test case start time, browser, viewport and count, which include pages, actions and events.

At the top of the trace, you can see a timeline view of each action of your test. The timeline shows image snapshots after hovering over it, and double-clicking any action will show its time range.
The slider adjustment lets you choose additional actions that directly filter the Actions tab while controlling log visibility in the console and network tabs.

The Watch feature enhances the testing experience by automatically rerunning the test when changes are made to the test file. This eliminates the need for manually re-executing tests after modifications, making the development and debugging process more efficient.
To enable the Watch in Playwright UI mode, simply click on the watch icon next to the specific test case. Once enabled, any changes made to that test file will automatically trigger the test to re-execute.

Source
In the Source tab, you can see the source code of the selected test case.

Call
In the Call tab, you can view the details of a particular command, including its start time, the time it takes to complete and other parameters.

Log
The Log tab provides the execution of the particular command in detail.
In the below screenshot, you can see the command is attempting to fill the “Last Name” field with the value “Automation”. It first waits for the textbox with the role textbox and the name Last Name* to be located.
Once the locator resolves to the correct <input> element, the script attempts to perform the fill action. However, before filling, it ensures that the element is visible, enabled, and editable.

The Error tab lets you know the reason for test failure. In case any test fails, the Timeline at the top is also highlighted with a red color where the error comes.

The Console tab shows the log from the test and browser. The icons below indicate whether the console log came from the browser or the test file.

In the Network tab, you can see all the requests made during the test execution. You can filter the network requests and sort them by different types of requests, methods, status codes, content types, sizes and durations.

The Attachments tab helps with visual image comparison by identifying the difference between the images. By clicking on Diff, you can see the difference between the actual and expected images.

Annotations are special markers that you can add to test suites to change the behavior of the test execution. Any of the tests are marked as test.skip(), test.fail(), test.fixme(), test.slow() will show in the UI mode.

Overall, Playwright UI mode makes debugging tests easier with its interactive interface, but running tests locally has limitations.
However, AI-native test execution platform such as TestMu AI allows you to scale these tests across real browsers and devices on the cloud, ensuring reliable results in different environments—without worrying about infrastructure setup.
To get started, refer to this guide on Playwright testing with TestMu AI.
With Playwright UI mode, you can fully access automated test functionality without any hindrances. The real-time visual testing framework enhances debugging, improves test reliability, and accelerates test development.
Integrated features such as live test execution monitoring, step-by-step debugging, Trace Viewer, and selector inspection make the test automation process more efficient.
Leveraging Playwright UI mode can optimize test automation workflows, leading to higher test quality and reduced debugging time. This streamlined approach enables you to create more effective test scripts and quickly resolve test failures.
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance