This page is for manual testers moving into automation, Selenium engineers switching stacks, and SDETs with a few years of Playwright who want to check their depth before an interview. It was compiled by VidhaiX trainers who run mock interviews for automation roles, and the answers describe what a strong candidate says rather than a textbook definition.
In 2026, Indian product companies and startups rarely ask you to recite APIs. They probe why your tests are stable: locators, auto-waiting, web-first assertions, fixtures, auth reuse, network mocking and how you debug a CI failure from a trace. Service companies add framework design and Selenium migration questions. AI-assisted testing with Playwright MCP now shows up in senior rounds. Questions are grouped into freshers, intermediate, experienced (3+ years) and scenario-based rounds, with short code samples where they help.
How to Prepare for a Playwright Interview
- Build a small suite against a real app with login, a form, a table and a file upload, using only role-based locators and web-first assertions, and push it to a public GitHub repo.
- Set up a setup project that logs in once and saves storageState, then make every other project depend on it. Be ready to explain the file and why it is gitignored.
- Run your suite in GitHub Actions with sharding across at least two jobs, upload the blob reports, and merge them into one HTML report you can open and walk through.
- Deliberately break a test, download the trace from CI, and practise explaining the failure from the actions, network and console tabs in under two minutes.
- Write one test that mocks a slow or failing API with page.route() and one that seeds data through the request fixture, so you can discuss when each approach is appropriate.
- Refactor a page object into a custom fixture and be ready to argue the trade-offs, including worker-scoped fixtures for expensive setup like test accounts.
- Try Playwright MCP with an AI coding agent to generate a test from a user story, then review the output critically and note what you had to fix.
Playwright Interview Questions for Freshers
12 questions
Q1.What is Playwright, and how is it architecturally different from Selenium?
Playwright is an open-source browser automation library from Microsoft, with its own test runner, @playwright/test. It drives Chromium, Firefox and WebKit from one API and supports TypeScript, JavaScript, Python, Java and .NET.
The key difference is the transport. Selenium sends HTTP commands through the WebDriver protocol to a separate driver per browser. Playwright keeps one persistent connection to the browser and talks a native protocol, so it receives events like navigation and network activity as they happen. That is what makes auto-waiting, network interception and tracing built in rather than bolted on.
Q2.Which browsers does Playwright support, and what does testing on WebKit actually tell you?
Playwright ships pinned builds of Chromium, Firefox and WebKit, installed with npx playwright install. It can also run branded Chrome and Edge through the channel option.
A good answer is honest about WebKit: it is the engine behind Safari, so it catches many Safari-specific layout and API issues, but it is not Safari itself. For final sign-off on real iPhones you still need a device cloud. Mobile emulation via devices sets viewport, user agent and touch, but it is still a desktop browser underneath.
Q3.What is a browser context, and why does Playwright create a fresh one for every test?
A browser context is an isolated, incognito-like session inside one browser process, with its own cookies, local storage, cache and permissions. Creating one takes milliseconds, unlike launching a new browser.
Playwright Test gives each test a new context through the context and page fixtures, so state from one test cannot leak into another. That isolation is what makes parallel runs safe. A weak answer says "it is like a new tab"; tabs share a context, contexts do not share anything.
Q4.Which locator strategies does Playwright recommend, and why is getByRole preferred over CSS or XPath?
The recommended order is user-facing locators first: getByRole, getByLabel, getByPlaceholder, getByText, then getByTestId, and CSS or XPath only as a last resort.
getByRole queries the accessibility tree, so it matches what a user and a screen reader see, survives class-name and DOM refactors, and quietly checks that the element is actually accessible. Locators are also strict: if one matches more than one element when you act on it, Playwright throws instead of clicking the first match, which surfaces ambiguous selectors early.
await page.getByRole('button', { name: 'Place order' }).click()
await page.getByLabel('Email').fill('asha@example.com')
await page
.getByRole('row', { name: /INV-1042/ })
.getByRole('link', { name: 'View' })
.click()Q5.How does Playwright auto-waiting work, and when does it not help?
Before an action such as click(), Playwright runs actionability checks: the element must be attached, visible, stable (not animating), able to receive events (not covered by an overlay) and enabled. It retries until they pass or the action timeout expires.
It does not help when the element is ready but the data is not: a table that renders an empty state, then fills in. It also cannot know business conditions like "the toast says saved". That is what web-first assertions are for. Adding waitForTimeout to fix these is the classic trap interviewers look for.
Q6.What are web-first assertions, and how are they different from asserting on a value you read yourself?
Web-first assertions like toBeVisible, toHaveText and toHaveURL take a locator or page and retry until the condition is true or the expect timeout passes. They re-query the DOM each time.
If you read a value first with textContent() and then assert on the string, you check a single snapshot, so a test passes or fails depending on timing. Strong candidates point out that expect(await locator.isVisible()).toBe(true) is the same anti-pattern and should be await expect(locator).toBeVisible().
// Flaky: reads once, no retry
expect(await page.locator('.status').textContent()).toBe('Paid')
// Stable: retries until it matches or times out
await expect(page.locator('.status')).toHaveText('Paid')Q7.What is the difference between a Locator and an ElementHandle?
A Locator is a lazy description of how to find an element. It is resolved fresh every time you act or assert, so it survives re-renders and works with auto-waiting and strictness.
An ElementHandle, returned by page.$(), points at one specific DOM node. If a framework like React re-renders that node, the handle goes stale and you get detached-element errors, much like Selenium stale element exceptions. Playwright discourages handles in tests; you should only reach for them in rare low-level cases.
Q8.How do you debug a failing Playwright test locally?
The fastest options are UI mode with npx playwright test --ui, which shows a timeline, DOM snapshots and a locator picker, and --debug, which opens the Inspector and pauses before each action. You can also drop await page.pause() into a test.
Running --headed alone is rarely enough. A strong candidate also mentions narrowing scope with test.only or -g, checking the trace, and using the VS Code extension to pick locators and run a single test with breakpoints.
Q9.What is Playwright codegen, and how much of its output would you keep?
npx playwright codegen <url> opens a browser and records your actions as test code, choosing role or test-id locators where it can. It can also save auth state with --save-storage.
It is great for discovering locators on an unfamiliar page and drafting a flow quickly. The output is not a finished test: it has no meaningful assertions, no structure, hard-coded data, and sometimes brittle text locators. Interviewers want to hear that you use it as a starting point, then refactor into fixtures or page objects and add real assertions.
Q10.What do you typically configure in playwright.config.ts?
The config sets testDir, timeouts, retries, workers, fullyParallel, reporters, and a use block shared by all tests: baseURL, trace, screenshot, video, locale and timezone. projects define browser or environment variations, and webServer can start the app before tests run.
A good answer explains environment-aware values, such as retries and a single worker only in CI, and recording traces on first retry so passing runs stay fast.
import { defineConfig, devices } from '@playwright/test'
export default defineConfig({
testDir: './tests',
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
reporter: [['html'], ['list']],
use: {
baseURL: process.env.BASE_URL ?? 'http://localhost:3000',
trace: 'on-first-retry',
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
})Q11.How do you handle file uploads and downloads in Playwright?
For uploads, call setInputFiles() on the file input with a path, an array of paths, or an in-memory buffer. If the app uses a custom button that opens a native dialog, wait for the filechooser event instead.
For downloads, start waiting for the download event before clicking, then use saveAs() or path() and assert on the file name or contents. Registering the wait after the click is a common race condition.
await page.getByLabel('Resume').setInputFiles('fixtures/resume.pdf')
const downloadPromise = page.waitForEvent('download')
await page.getByRole('button', { name: 'Export CSV' }).click()
const download = await downloadPromise
expect(download.suggestedFilename()).toBe('orders.csv')
await download.saveAs('test-results/orders.csv')Q12.What is the Playwright Trace Viewer, and when should traces be recorded?
A trace is a zip that captures every action with before and after DOM snapshots, console logs, network requests, source location and errors. You open it with npx playwright show-trace or at trace.playwright.dev, and you can inspect the DOM at each step.
Recording on every run costs time and disk, so the common setting is trace: on-first-retry or retain-on-failure. A strong candidate says traces are the first thing they open for a CI failure, before trying to reproduce locally.
Playwright Intermediate Interview Questions
12 questions
Q13.What are fixtures in Playwright Test, and why use them instead of beforeEach hooks?
Fixtures are named, lazily created dependencies that a test requests in its parameters, like page or request. You define custom ones with test.extend(). Setup runs before use(), teardown after, and only for tests that ask for the fixture.
Compared with beforeEach, fixtures are composable, typed, reusable across files, and can be test-scoped or worker-scoped. Hooks run for every test in a file whether needed or not and share state through outer variables, which gets messy as suites grow.
import { test as base } from '@playwright/test'
import { TodoPage } from './pages/todo-page'
export const test = base.extend<{ todoPage: TodoPage }>({
todoPage: async ({ page }, use) => {
const todoPage = new TodoPage(page)
await todoPage.goto()
await use(todoPage)
await todoPage.clearAll()
},
})Q14.Page Object Model or fixtures: which do you use, and how do they fit together?
They solve different problems. Page objects encapsulate locators and user actions for a screen. Fixtures handle construction, setup, teardown and dependency injection. The usual mature pattern is page objects exposed through fixtures, so tests just ask for checkoutPage and get a ready instance.
Traps to mention: page objects that hide assertions, giant base classes with inheritance chains, and methods that return raw locators for everything. Keep page objects thin, keep assertions mostly in tests, and avoid wrapping every Playwright call.
Q15.What does test.step do, and why would you use it?
test.step() groups actions under a named step that appears in the HTML report, the trace viewer and UI mode. A failure is reported against the step, so "Apply coupon" failing reads much better than a stack trace pointing at line 87.
Steps can be nested and return values. A useful pattern is wrapping page object methods in steps, sometimes via a decorator, so reports read like business flows. Over-stepping every single click adds noise without value.
Q16.How do projects work in Playwright, and what are they used for beyond running multiple browsers?
A project is a named configuration with its own use options, test match patterns and timeouts. Running several browsers is the obvious case, but projects also model environments, mobile versus desktop, logged-in roles, or smoke versus full suites.
The important feature is dependencies: a setup project, for example one that logs in or seeds data, runs first, and dependent projects only start if it passes. Unlike globalSetup, setup projects show up in reports and traces, and can use fixtures.
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], storageState: 'playwright/.auth/user.json' },
dependencies: ['setup'],
},
]Q17.How do you avoid logging in through the UI in every test?
Log in once in a setup project, then save cookies and local storage with context.storageState({ path }). Other projects load that file through the storageState option, so every test starts authenticated in its own context.
Strong answers cover the details: keep the auth file out of git, use one file per role (admin, buyer), log in via API instead of UI when possible, and if tests mutate server-side user state, give each parallel worker its own account with a worker-scoped fixture.
// auth.setup.ts
import { test as setup, expect } from '@playwright/test'
setup('authenticate', async ({ page }) => {
await page.goto('/login')
await page.getByLabel('Email').fill(process.env.E2E_USER!)
await page.getByLabel('Password').fill(process.env.E2E_PASS!)
await page.getByRole('button', { name: 'Sign in' }).click()
await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()
await page.context().storageState({ path: 'playwright/.auth/user.json' })
})Q18.How do you intercept or mock network requests with page.route()?
page.route() (or context.route()) registers a handler for matching URLs. Inside it you can fulfill() with a fake response, abort() the request, continue() with modified headers, or fetch() the real response and patch it before fulfilling.
Use it to test empty states, error banners, slow responses and edge cases the backend cannot easily produce. The trade-off is that mocked tests no longer prove the integration works, so keep a smaller set of unmocked end-to-end tests too.
await page.route('**/api/orders', async (route) => {
await route.fulfill({ status: 500, json: { error: 'Internal error' } })
})
await page.goto('/orders')
await expect(page.getByRole('alert')).toHaveText(/could not load orders/i)Q19.How do you do API testing in Playwright, and why combine it with UI tests?
The request fixture gives an APIRequestContext that sends HTTP calls with get, post and so on, honouring baseURL and extra headers from config. You assert on response.ok(), status and parsed JSON.
Combining it with UI tests is the real value: create data through the API, verify it in the UI, or do an action in the UI and confirm the backend state via API. A page context also has page.request, which shares cookies with the browser session.
test('created order appears in the list', async ({ request, page }) => {
const res = await request.post('/api/orders', { data: { sku: 'PW-101', qty: 2 } })
expect(res.ok()).toBeTruthy()
const { id } = await res.json()
await page.goto('/orders')
await expect(page.getByRole('row', { name: new RegExp(id) })).toBeVisible()
})Q20.How do you work with iframes and shadow DOM in Playwright?
For iframes, use page.frameLocator() or locator.contentFrame() and chain normal locators inside it. There is no Selenium-style switching, so you never have to switch back, and auto-waiting still applies.
For shadow DOM, Playwright CSS and role locators pierce open shadow roots by default, so you usually do nothing special. XPath does not pierce shadow roots, and closed shadow roots are not reachable, which is a good detail to mention when explaining why some selectors fail.
Q21.How do you handle new tabs, popups and multiple pages in one test?
Start waiting for the page before triggering it: context.waitForEvent('page') for any new page in the context, or page.waitForEvent('popup') for one opened by a specific page. Then wait for its load state and use it like any other page.
For multi-user flows, such as a buyer and a seller chatting, create two separate contexts in the same test so each has its own session. Two pages in one context share cookies and would be logged in as the same user.
const popupPromise = page.waitForEvent('popup')
await page.getByRole('link', { name: 'Open invoice' }).click()
const invoice = await popupPromise
await invoice.waitForLoadState()
await expect(invoice.getByRole('heading', { name: /Invoice/ })).toBeVisible()Q22.How do retries work in Playwright, and what does a "flaky" status mean?
With retries set, a failed test is re-run in a fresh worker. If it passes on retry, the report marks it flaky instead of passed, so the signal is not lost. You can read testInfo.retry to collect extra diagnostics on retries.
The trap is treating retries as the fix. A good answer says retries keep the pipeline usable while you track flaky tests separately, read their traces, and fix the root cause. Some teams fail the build when flaky counts cross a threshold.
Q23.How do visual comparisons work in Playwright, and why are they often unstable?
await expect(page).toHaveScreenshot() captures a screenshot and compares it pixel by pixel to a stored baseline. The first run creates the baseline; --update-snapshots refreshes it. You can tune maxDiffPixels or threshold, mask dynamic regions, and disable animations.
Instability usually comes from font rendering differences across operating systems, dynamic content like dates and ads, and animations. Baselines are stored per browser and platform, so generate and compare them in the same Docker image in CI.
Q24.When would you use expect.poll, toPass or soft assertions?
expect.poll() retries a function that returns a value, useful for waiting on something outside the DOM, like an API reporting a job as complete. expect(...).toPass() retries a whole block of actions and assertions until it passes. Soft assertions with expect.soft() record a failure but let the test continue.
Each has a trap. Wrapping half a test in toPass hides real bugs, polling without a sensible timeout slows the suite, and soft assertions after a failed navigation produce confusing reports.
Playwright Interview Questions for Experienced (3+ Years)
11 questions
Q25.Explain Playwright architecture end to end: client, driver and browser protocol.
Your test code is a client. It talks over a pipe or WebSocket to the Playwright driver, a Node.js server that runs out of process. The driver talks to browsers using CDP for Chromium and Playwright-maintained protocol patches for Firefox and WebKit, which is why it ships its own browser builds.
This design gives the same API across languages, since Python and Java clients use the same driver. It also lets the driver see network and lifecycle events directly. Remote browsers fit naturally via connect() or connectOverCDP(), the latter being Chromium-only and less faithful.
Q26.How does Playwright parallelism work, and what breaks when you turn on fullyParallel?
Playwright runs test files in parallel across worker processes, each with its own browser. By default tests within a file run serially; fullyParallel: true distributes individual tests across workers too. Worker count comes from workers, and test.describe.configure({ mode: 'serial' }) forces ordering where truly needed.
What breaks is hidden shared state: tests reusing the same user, the same record, or relying on order. A strong answer mentions testInfo.workerIndex for per-worker accounts and data that is unique per test rather than shared.
Q27.How do you shard a Playwright suite across CI machines and still get one report?
Run npx playwright test --shard=1/4 through --shard=4/4 on separate jobs. With fullyParallel enabled, sharding splits at test level and balances better; otherwise it splits by file.
Each shard uses the blob reporter and uploads its output as an artifact. A final job downloads all blobs and runs npx playwright merge-reports to produce one HTML report. Interviewers like candidates who mention that sharding multiplies infrastructure cost and test data needs, not just speed.
# per shard
npx playwright test --shard=2/4 --reporter=blob
# final job, after downloading all blob-report artifacts into all-blob-reports/
npx playwright merge-reports --reporter=html ./all-blob-reportsQ28.How would you run Playwright in GitHub Actions, and why use the official Docker image?
A basic workflow installs Node, runs npm ci, installs browsers with npx playwright install --with-deps, runs tests and uploads the report and traces with if: always() so failures are still inspectable.
The official mcr.microsoft.com/playwright image has browsers and system dependencies preinstalled. That saves install time and, more importantly, gives identical fonts and libraries locally and in CI, which visual tests depend on. Pin the image tag to the same version as @playwright/test in your lockfile.
jobs:
e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:<version>-noble
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/Q29.How do you manage test data for a large parallel Playwright suite?
Each test should create what it needs, usually through API calls or database seeding in fixtures, with unique identifiers such as a prefix plus worker index and timestamp. Teardown in the fixture cleans up, and a scheduled job purges leftovers from crashed runs.
Shared static data, like a catalogue, is fine if tests only read it. Weak answers rely on a fixed set of pre-created users and records, which collide under parallelism. Mention environment isolation too: ephemeral preview environments per pull request remove most cross-team interference.
Q30.What is Playwright component testing, and when would you choose it over end-to-end tests?
Component testing mounts a single React, Vue or Svelte component in a real browser using packages like @playwright/experimental-ct-react, with the mount fixture. You get real rendering, CSS and events, plus the full locator and assertion API.
It suits complex widgets such as date pickers, data grids and form validation, where full E2E setup is slow. Be honest that it is still marked experimental and differs from unit testing with Vitest and Testing Library. Many teams use Vitest browser mode or Storybook tests instead, so justify the choice.
Q31.What is Playwright MCP, and how do AI agents use it to drive a browser?
Playwright MCP is a Model Context Protocol server that exposes browser actions, such as navigate, click, type and snapshot, as tools an AI agent can call. By default it gives the model a structured accessibility snapshot of the page with element references rather than screenshots, which is cheaper and more reliable than vision-based clicking.
Teams use it for exploratory checks, reproducing bug reports and drafting tests from user stories. A senior answer covers limits: the agent can misread intent, it needs a safe non-production environment, and every generated test needs human review.
Q32.How would you evaluate AI-generated or self-healing Playwright tests before trusting them?
Playwright now ships test agents for planning, generating and healing tests, and other tools offer similar features. Treat their output like code from a new team member. Check that assertions verify business outcomes rather than just "page loaded", that locators are role-based, and that tests fail when the feature is broken, for example by mutating the app.
For healing, the risk is a tool "fixing" a test by matching a different element and masking a real regression. Require heals to come as reviewable diffs, never silent runtime substitutions, and track how often each test gets healed.
Q33.How would you structure a Playwright framework shared by several product teams?
Publish a shared internal package with base fixtures, auth helpers, API clients, custom matchers via expect.extend() and reporters. Each team keeps its own tests and page objects in its repo and imports test from the shared package.
Use tags in titles or the tag option and --grep for smoke, regression and team ownership. Enforce lint rules such as no waitForTimeout and no .only. Version the shared package carefully, because one Playwright upgrade across ten teams is a project, not a one-line change.
Q34.How do you test time-dependent features such as session expiry or countdown timers?
Use the clock API: page.clock.install() controls Date, timers and intervals, then fastForward(), runFor() or setFixedTime() move time without real waiting. Install it before the page loads so the app picks up the fake clock.
This replaces hacks like 15-minute sleeps. For server-side expiry, the browser clock does not help, so expose a test-only API or configure short timeouts in the test environment. Mention that timezone and locale can also be pinned per project with timezoneId and locale.
await page.clock.install({ time: new Date('2026-10-22T09:00:00') })
await page.goto('/dashboard')
await page.clock.fastForward('30:00')
await expect(page.getByRole('dialog', { name: 'Session expired' })).toBeVisible()Q35.A 600-test suite takes 45 minutes in CI. How do you bring it under 10?
First measure: the HTML report and a JSON reporter show the slowest tests and how time splits between setup and steps. Typical wins are logging in once with storageState, creating data via API instead of UI, removing fixed waits, enabling fullyParallel, and sharding.
Then question coverage. Many UI tests only check validation or API behaviour and belong at the API or component level. Run a tagged smoke set on every pull request and the full suite on merge or nightly. Cutting redundant tests often saves more than any infrastructure change.
Playwright Scenario-Based Interview Questions
8 questions
Q36.Your suite passes locally but is flaky only in CI. What do you do?
Start with evidence, not reruns. Pull the traces and compare failing steps: timeouts on actions point to slow environments or overlays, assertion mismatches point to data or timing. Check whether failures correlate with a worker, shard or test order, which suggests shared state.
Common CI-only causes are fewer CPU cores, cold backends, shared test accounts under parallelism, different viewport or fonts, and waitForTimeout tuned to a fast laptop. Reproduce with --workers matching CI and --repeat-each, fix the root cause, and keep the test quarantined with a tracking ticket meanwhile.
Q37.After a UI release, many tests fail with a strict mode violation. How do you handle it?
A strict mode violation means a locator now matches several elements, often because the design added a second "Save" button or a duplicated mobile menu. Do not fix it by adding .first() everywhere; that silently picks whichever element happens to be first.
Scope the locator to its region instead: page.getByRole('dialog').getByRole('button', { name: 'Save' }), or filter by a parent row with filter({ hasText }). If the markup is genuinely ambiguous to users too, raise it with the developers as an accessibility issue.
Q38.Login uses SSO with OTP, and the identity provider rate-limits test logins. How do you automate around it?
Avoid repeating the real login. Authenticate once per run in a setup project and reuse storageState, or per worker if accounts must differ. Ask for a test tenant with OTP disabled, a fixed OTP for test users, or a backend endpoint that issues sessions in non-production environments.
Keep one dedicated test that exercises the real SSO flow, so you still catch login regressions. A weak answer reads OTPs from a real inbox for every test, which is slow, flaky and hits the same rate limits.
Q39.Checkout uses a third-party payment iframe that is slow and sometimes unavailable in staging. How do you test it?
Split the concerns. For most checkout tests, mock the payment provider at the network level with page.route() or use the provider test mode with test cards, so your order logic is tested reliably.
Keep a small set of tests that interact with the real iframe through frameLocator() using the provider sandbox, run them on a schedule or before release, and alert on provider downtime separately. Confirm the result through your own backend or webhook state rather than only the iframe success message.
Q40.Visual tests pass in CI but fail on every developer laptop. What is going on, and how do you fix the workflow?
Screenshots differ across operating systems because of font rendering, anti-aliasing and installed fonts, and baselines are stored per platform. Developers on macOS compare against Linux baselines generated in CI, so everything looks different.
Run visual tests locally inside the same official Playwright Docker image, or only run them in CI and download the diff from the report. Update baselines through a CI job or the same container, not on a laptop, and review baseline changes in pull requests like code.
Q41.Your manager wants to migrate 800 Selenium tests to Playwright in a quarter. How do you plan it?
Do not translate line by line. Audit first: delete obsolete and duplicate tests, and move validation-heavy checks to API tests. Build the Playwright foundation, including config, auth, fixtures, data helpers and CI, then migrate by business-critical flow, running both suites in parallel until each area is trusted.
Rewrite explicit waits and XPath into role locators and web-first assertions rather than porting them. AI tools can speed up drafting, but every converted test needs review. Report progress as risk covered, not test count.
Q42.An AI healing agent opened a PR that changes 40 locators after a redesign. How do you review it?
Check intent, not just green builds. For each change, confirm the new locator targets the same user-visible element and that assertions were not weakened or removed. Watch for locators that became generic, like falling back to CSS classes or nth() indexes.
Run the changed tests against the redesign and against a deliberately broken build to confirm they still fail. If many locators broke because accessible names changed, that is product feedback too. Merge in small batches so a bad heal is easy to trace.
Q43.A downstream service in staging is unstable and keeps breaking your E2E suite. Do you mock it or not?
Both, deliberately. Most UI tests should not fail because an unrelated service is down, so mock that dependency with page.route() or a stub server and test your app behaviour, including its error handling.
Keep a thin layer of true end-to-end tests that hit the real service, label them clearly, and report their failures to the owning team instead of blocking every merge. Add contract tests so mocks cannot drift from the real API, which is the main risk of mocking.