Skip to content

Playwright coverage

Allgreen’s goal is to let people who do not write code use all of Playwright, the testing tool it runs on. To know how far it is, it keeps a list of every capability Playwright gives a test writer, and marks each one.

Each capability of Playwright 1.65 (its pages, elements, checks and test options) gets one of four marks:

  • Covered: you can do it in Allgreen.
  • Partly covered: you can do part of it.
  • Not yet: planned, not there yet.
  • Left out on purpose: plumbing for developers, or against the no-code promise. These are not counted.

The score is (covered + half of partly covered) ÷ (covered + partly covered + not yet). An automatic test checks that the summary matches the list.

73 % of Playwright today: 83 capabilities covered, 8 partly covered, 29 not yet, 20 left out. Every row below links to the Playwright documentation of what it covers.

Area✅🟡❌➖Coverage
Navigation401180%
Actions18004100%
Finding elements1111088%
Checks1816574%
Pages, tabs, frames, dialogs511179%
Browsers and devices310088%
Simulated conditions314144%
Connection to the site204233%
Sessions and sign-in102033%
Network and APIs00510%
Test data and reuse123033%
Running701288%
Reports and debugging7002100%
Writing tests311170%

✅ Covered · 🟡 Partly · ❌ Not yet · ➖ Left out

What a test can doIn PlaywrightIn AllgreenHow
Open a pagepage.goto✅ Covered“Go to” step
Check where the browser wentpage.waitForURL, toHaveURL✅ Covered“Check the page”: the address contains a text, or is exactly that address
Go back, go forwardpage.goBack, page.goForward✅ Covered“Go back” and “Go forward” steps
Reload the pagepage.reload✅ Covered“Reload the page” step
Wait for the page to finish loadingpage.waitForLoadState❌ Not yetSteps already wait for what they act on
Write the page's HTMLpage.setContent➖ Left outTests a site, not a snippet

Actions

What a test can doIn PlaywrightIn AllgreenHow
Clickclick✅ Covered“Click” step
Type a value in a fieldfill✅ Covered“Fill in” step, a secret allowed
Press a key or a shortcutpress, keyboard.press✅ Covered“Press a key” step, on an element or the page
Check or uncheckcheck, uncheck, setChecked✅ Covered“Check a box” step
Choose an option in a listselectOption✅ Covered“Choose in a list” step
Choose several optionsselectOption([…])✅ Covered“Several options”
Wait a momentpage.waitForTimeout✅ Covered“Wait a moment” (a fixed time) and “Wait until…” an element appears or disappears
Double-clickdblclick✅ Covered“Click”, double
Right-clickclick({ button: 'right' })✅ Covered“Click”, right
Hoverhover✅ Covered“Hover over an element”
Type one key at a timepressSequentially✅ Covered“Fill in”, key by key
Clear a fieldclear✅ Covered“Fill in” with nothing reads “Clear”
Upload a filesetInputFiles✅ CoveredThe file is kept in the project (`allgreen/files/`)
Drag and dropdragTo, page.dragAndDrop✅ Covered“Drag and drop”
Scroll to an elementscrollIntoViewIfNeeded✅ Covered“Scroll to an element”
Scroll the pagemouse.wheel✅ Covered“Scroll the page” up or down by screens
Tap (touch screens)tap✅ Covered“Tap an element”: a touch on a phone or tablet, a click on a computer
Focus a fieldfocus✅ Covered“Focus an element”
Mouse by coordinatesmouse.move, mouse.down, mouse.up➖ Left outBreaks as soon as the layout moves
Send a raw DOM eventdispatchEvent➖ Left outPlumbing
Select text, insert textselectText, keyboard.insertText➖ Left outRarely what a test means
Hold a key downkeyboard.down, keyboard.up➖ Left outShortcuts are covered by “Press a key”

Finding elements

What a test can doIn PlaywrightIn AllgreenHow
By kind and name (button “Buy”)getByRole✅ Covered
By field labelgetByLabel✅ Covered
By visible textgetByText✅ Covered
By placeholdergetByPlaceholder✅ Covered
Exact text or containing it{ exact }✅ Covered
Inside an area (the “Product B” card)locator.getBy…✅ Covered“Within”
The n-th of severalnth, first, last✅ Coveredn-th, first, last
By image descriptiongetByAltText✅ Covered“Its image description”
By tooltipgetByTitle✅ Covered“Its tooltip”
By test idgetByTestId✅ Covered“Its test id”, the usual `data-testid` attribute
By CSS or XPathlocator('css=…')✅ Covered“Its code in the page (advanced)”, last of the list
Among several, the one that contains…filter({ hasText, has })🟡 Partly“That contains the text”; not yet “that contains an element”
Either one, bothor, and❌ Not yetA banner that may or may not show

Checks

What a test can doIn PlaywrightIn AllgreenHow
Is visibletoBeVisible✅ Covered
Is hidden or gonetoBeHidden✅ Covered
A field's valuetoHaveValue✅ CoveredA secret allowed
Page addresstoHaveURL✅ CoveredContains, or exactly
Page titletoHaveTitle✅ CoveredContains, or exactly
An element's texttoHaveText, toContainText✅ Covered“Check an element”: contains a text, or exactly
How many there aretoHaveCount✅ Covered
Enabled, disabledtoBeEnabled, toBeDisabled✅ Covered
CheckedtoBeChecked✅ Covered
EditabletoBeEditable✅ Covered
EmptytoBeEmpty✅ Covered
Has the keyboard focustoBeFocused✅ Covered
On screen without scrollingtoBeInViewport✅ Covered
Present in the page, even hiddentoBeAttached✅ Covered
An attribute (a link's address…)toHaveAttribute✅ Covered
Several values of a listtoHaveValues✅ Covered“Check a field”, several values
Accessible name, description, error messagetoHaveAccessibleName, …Description, …ErrorMessage❌ Not yet
Kind of elementtoHaveRole❌ Not yet
Looks the same as before (page)expect(page).toHaveScreenshot✅ Covered“Check the page”: looks the same, the whole page or what is on screen, areas to ignore, how strict; references in `allgreen/references/`
Looks the same as before (element)expect(locator).toHaveScreenshot✅ Covered“Check an element”: looks the same
Structure the same as beforetoMatchAriaSnapshot❌ Not yet
The opposite of a checkexpect(…).not🟡 PartlyEvery check of an element; not yet the page or a field
Keep going after a failed checkexpect.soft❌ Not yet
Wait until a check passesexpect.poll, toPass❌ Not yet
A response is OKtoBeOK❌ Not yet
CSS class, CSS propertytoHaveClass, toContainClass, toHaveCSS➖ Left outHow a page is built, not what it shows
IdtoHaveId➖ Left outSame
JavaScript propertytoHaveJSProperty➖ Left outPlumbing
Values in codetoBe, toEqual, toMatch➖ Left outCode, not a page
Custom matchersexpect.extend➖ Left outCode

Pages, tabs, frames, dialogs

What a test can doIn PlaywrightIn AllgreenHow
A link that opens a new tab or windowcontext.waitForEvent('page'), page.waitForEvent('popup')✅ Covered“Opens a new tab” on a click (the recorder sets it); “Go back to the first tab”
Inside a frame (embedded payment form…)frameLocator, contentFrame✅ Covered“Where is it?”: in an embedded frame, by its title or position
Accept or dismiss a browser dialogpage.on('dialog')✅ Covered“Answer the next dialog” (accept, dismiss, type an answer); a check of its message
Download a filepage.waitForEvent('download')✅ Covered“Downloads a file” on a click, its name checked; the file kept in the report
Close something that pops up anytime (cookie banner)page.addLocatorHandler✅ CoveredProject settings, “Banners and surprises”: what shows, and what to click to close it
No error in the page's consolepage.on('pageerror'), consoleMessages🟡 Partly“Fail when the page has an error” (JavaScript errors); not yet console messages
Several pages at once (two users chatting)context.newPage, browser.newContext❌ Not yet
Save the page as PDFpage.pdf➖ Left outNot a check

Browsers and devices

What a test can doIn PlaywrightIn AllgreenHow
Chromium, Firefox, WebKitbrowserName✅ CoveredEvery plan on each chosen browser
Emulated devices (iPhone, Pixel…)devices[…]✅ CoveredEvery device Playwright knows
Real Chrome or Edgechannel✅ CoveredProject settings, “Chromium plans run in”: Google Chrome or Microsoft Edge installed on the computer
Any window sizeviewport🟡 PartlyThe computer’s screen size; phones and tablets keep their own

Simulated conditions

What a test can doIn PlaywrightIn AllgreenHow
Languagelocale✅ CoveredProject settings, “Language of the browser”
Time zonetimezoneId✅ CoveredProject settings, “Time zone”
Locationgeolocation❌ Not yet
Permissions (camera, notifications…)permissions❌ Not yet
Dark modecolorScheme✅ CoveredProject settings, “Look”: light or dark
Reduced motion, forced colors, contrastreducedMotion, forcedColors, contrast🟡 Partly“Reduce motion”; not yet forced colors or more contrast
No networkoffline❌ Not yet
Time set or stoppedpage.clock❌ Not yet“It is Christmas Eve”
JavaScript turned offjavaScriptEnabled➖ Left outRare

Connection to the site

What a test can doIn PlaywrightIn AllgreenHow
Sign in with HTTP authenticationhttpCredentials✅ CoveredThe password is a secret
Another user agentuserAgent❌ Not yet
Extra headers on every requestextraHTTPHeaders❌ Not yet
Client certificatesclientCertificates❌ Not yet
Through a proxyproxy❌ Not yet
Sites with a self-signed certificateignoreHTTPSErrors✅ Covered“Accept a certificate the browser does not trust”, for test and staging servers
Ignore the page's security policybypassCSP➖ Left outPlumbing
Service workersserviceWorkers➖ Left outPlumbing

Sessions and sign-in

What a test can doIn PlaywrightIn AllgreenHow
Sign in once, every plan starts signed instorageState✅ CoveredThe project's sign-in plan
Several signed-in people (admin, customer)storageState❌ Not yet
Set or clear cookiesaddCookies, clearCookies❌ Not yet“The cookie banner was already accepted”

Network and APIs

What a test can doIn PlaywrightIn AllgreenHow
Block requests (ads, analytics)page.route, abort❌ Not yet
Answer in place of the serverroute.fulfill❌ Not yet“What if the payment service is down?”
Wait for a request or a responsewaitForRequest, waitForResponse❌ Not yet
Replay a recorded sessionrouteFromHAR❌ Not yet
Call an API and check its answerrequest, toBeOK❌ Not yet
WebSocket mocksrouteWebSocket➖ Left outPlumbing

Test data and reuse

What a test can doIn PlaywrightIn AllgreenHow
Passwords and keys kept out of plans✅ CoveredSecrets, in the system keychain in the app
Prepare before the plansbeforeAll🟡 PartlyThe sign-in plan only
Run some of the plansgrep🟡 PartlyOne plan or all; no tags
Use a plan inside anothertest.step❌ Not yet
The same plan for each row of a table❌ Not yet
Values made at run time (a unique email…)❌ Not yet

Running

What a test can doIn PlaywrightIn AllgreenHow
Plans run side by sideworkers, fullyParallel✅ Covered
Try a failed plan againretries✅ CoveredProject settings: 0, 1 or 2 new tries
Time limitstimeout, actionTimeout, expect.timeout✅ CoveredProject settings: patience, in seconds, for actions and checks
Watch the browser while it runsheadless: false✅ Covered“Run differently”: watch it, on one browser and device, slowed down
Pause on a step, go step by steppage.pause, --debug✅ CoveredStep by step, driven from Allgreen: continue, play all, stop
Run a plan several times (is it flaky?)repeatEach✅ Covered“Run differently”: repeat it 2 to 10 times; the report says how many passed
Stop after N failuresmaxFailures✅ CoveredProject settings
Start the site before the runwebServer❌ Not yet
Several machinesshard➖ Left outFor CI, where the export goes
Projects, global setup, tsconfig…➖ Left outPlumbing

Reports and debugging

What a test can doIn PlaywrightIn AllgreenHow
A report of every result✅ CoveredPer plan × browser × device, in plain words
Screenshot of a failurescreenshot: 'only-on-failure'✅ Covered
Video of a failurevideo: 'retain-on-failure'✅ Covered
Trace of a failuretrace: 'retain-on-failure'✅ CoveredOpened from the app
Screenshot on demandpage.screenshot✅ Covered“Screenshot” step
Whole-page screenshotscreenshot({ fullPage })✅ Covered“Take a screenshot”: the whole page
Screenshot of one elementlocator.screenshot✅ Covered“Take a screenshot”: one element
Reports for other tools (JUnit, HTML)reporter➖ Left outFor technical teams: the exported Playwright project has them
Custom attachments and annotationstestInfo.attach➖ Left outCode

Writing tests

What a test can doIn PlaywrightIn AllgreenHow
Record actions in a browsercodegen🟡 PartlyChromium at desktop size, actions only
Plans as Playwright code✅ Covered`allgreen export`
Readable steps in the reporttest.step✅ CoveredEvery step is a sentence
Record checks toocodegen❌ Not yet
Pick an element by clicking itpage.pickLocator✅ Covered“Choose in the page” on an element: a click in a browser window fills the fields
UI mode, VS Code extension➖ Left outAllgreen is that interface
  • Well covered: everything you do on a page (click, type, choose, drag, upload…), finding elements, most checks, tabs, dialogs, downloads, frames, running and reports.
  • Coming next: any window size for phones and tablets; several signed-in people; changing what the network answers; running one plan for each row of a table.
  • Left out: things that only make sense in code, such as mouse moves by coordinates or custom report formats. For those, export your plans and hand them to a developer.

The full list, capability by capability, with what Allgreen offers for each: docs/playwright-coverage.md on GitHub.