What are the limitations of Playwright?
Playwright is a strong browser automation tool, but it is not a universal testing tool. A good interview answer names the real limits, explains why each one exists, and gives the usual workaround. Here they are, grouped by the question a tester would actually ask.
"Can I test on real Safari and real phones?"
- WebKit is not Safari. Playwright ships its own build of WebKit, the engine behind Safari. It catches most Safari-specific layout and JavaScript issues, but it is not the branded Safari app, and it does not include every Apple-specific feature. For a final check on real Safari, teams use a real Mac or a device cloud.
- Mobile is emulation.
devices['iPhone 13']sets the viewport, user agent, touch support and pixel ratio. It does not run iOS. Native gestures, real device performance and mobile browser quirks are not covered. Support for Chrome on Android is experimental, and there is none for real iOS devices. - No legacy browsers. Internet Explorer and the old (non-Chromium) Edge are not supported.
A typical config still covers a lot of ground, as long as everyone knows the last project is an emulation:
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } }, // WebKit build, not Safari
{ name: 'mobile', use: { ...devices['Pixel 7'] } }, // emulated phone
],
});
See which browsers Playwright supports and how mobile emulation works.
"Can it test things outside the browser?"
- Native desktop and mobile apps are out of scope. Use Appium, WinAppDriver or similar tools for those. Electron apps have experimental support.
- OS-level windows, such as the system print dialog or a native file explorer, cannot be clicked. In-page dialogs (
alert,confirm) and file uploads are fine, because Playwright handles them through events instead of the OS window; see file uploads in Playwright. - Browser extensions can be loaded only in Chromium, and only with a persistent context.
"Can it get past security checks?"
No, and it should not. CAPTCHAs, bot detection and SMS one-time passwords are designed to stop automation. The correct fix is in the test environment: use the CAPTCHA provider's test keys, a fixed OTP for test accounts, or an API-based login that skips the UI step. Ask the developers for a test hook rather than trying to beat the check.
"Does every language get the same features?"
The browser API is available in TypeScript/JavaScript, Python, Java and .NET. The test runner (fixtures, projects, retries, sharding, the HTML reporter, toHaveScreenshot) is the Node.js package @playwright/test. Python teams use the pytest plugin, and Java or .NET teams use JUnit, TestNG, NUnit or MSTest, so some runner features differ or need extra set-up. See using Python with Playwright.
Practical costs
- Browser downloads. Each Playwright release is tied to specific browser builds, which you download with
npx playwright install. They take disk space and must be refreshed when you upgrade, which matters on CI caches. - Upgrades change behaviour. A new release brings new browser versions, which can shift screenshot baselines. Pin the version and upgrade deliberately.
- Not a load-testing tool. Each worker drives real browsers, so you cannot simulate thousands of users. Use a dedicated load tool such as k6 or JMeter.
- Coding is required.
codegenhelps, but maintainable suites need someone comfortable with code, async/await and locators.
How to phrase it in an interview
Say that Playwright covers modern web apps across three engines very well, then list two or three limits with workarounds: WebKit is not real Safari, mobile is emulation, and CAPTCHAs need test keys. That shows you have used the tool rather than memorised a feature list. For the other side of the picture, read the main features of Playwright.
Want to master Playwright hands-on?
Join Uncodemy's Playwright Automation Testing Course in Noida — Dedicated Placement Support.
Explore the Course →