TOPIC 51/6020 MINNOT STARTED

Beyond the browser tab: service workers, offline mode, Electron, Android and WebView2

Test what lives around a web page: a service worker that keeps the app working offline, and desktop or phone apps that hold a web page inside them.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: the shop floor is not the whole shop. Customers walk the floor. Goods also arrive at the dock, and a back room holds stock when the shelf is empty. A good owner checks all three.

Tom tests Daily List, a to-do list app. So far he has tested the browser tab, the shop floor. Mei points at the back room. The app keeps a saved copy for times with no signal. It also has a desktop shell and a phone shell that hold the same page.

What it is: Playwright is a free program, made by Microsoft, that drives a real browser from test code. This topic is about the places around a normal tab. A is a script the page installs in the browser. It can answer from a saved copy when the network is gone. is Playwright pretending the network is down. An Electron app is a desktop program built from web pages. A WebView is a window inside another app that shows a web page. A headless browser is a browser with no window. Support for Electron and Android is marked experimental, so it can change.

Why it matters: Lily uses Daily List on a train and in the desktop app. A suite that only opens a tab never sees a broken offline copy or a desktop window that fails to open.

Some of these places are hidden. Tom has to know they exist before he can check them.

Kept simple: experimental support can change between versions. Read the current page before you copy a call.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are invented.)

PLAIN WORDS · 2 in this section
playwright
a free Microsoft tool that drives a browser for tests
headless
Without a visible window.

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Checking the places around the browser tab, such as the saved copy for offline use and the apps that hold a web page inside them.

  1. Load once online
  2. Go offline
  3. Reload and check
  4. Go back online
Check the floor, the back room and the dock

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The shop floorThe ordinary browser tab
The back room with stockThe service worker's saved copy
The loading dockThe desktop and phone apps around the page
Closing the front doorSetting the context offline

WHERE THIS PICTURE STOPS

  • A back room can be seen if you walk in. A service worker is hidden and a tester must know it is there.
  • Closing a door is clean. A real weak signal is slow and patchy, and offline mode does not copy that.
  • A dock is one place. Desktop and phone apps each need their own set-up.

HOOK

Check the floor, the back room and the dock.

REMEMBER IT THIS WAY

A chunk: a long list grouped so it is easier to hold.

Check the floor, the back room and the dock: the tab, the copy, and the desktop or phone app.

What each part of the trick stands for
In the trickWhat it stands for
floorthe ordinary browser tab
back roomthe service worker saved copy
dockthe desktop and phone apps

TELL A FRIEND

A shop has a floor, a back room and a dock, and a good owner checks all three.

OFTEN MIXED UP WITH Network interception: route, mock, change and wait for requests. The mocking lesson fakes server answers with route. This lesson shows when a hides requests from route.

Sources & standards — 5 sources
  1. Market practice

    Service Workers (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Explains service workers, offline use and why request interception can miss requests. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    BrowserContext (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: clearPermissions, grantPermissions and storageState options. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes offline emulation and what it covers. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: clearPermissions, grantPermissions and storageState options. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  3. Market practice

    Electron (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Electron application lifecycle. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes experimental Electron support. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Electron application lifecycle. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Android (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: experimental Android API and prerequisites. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes experimental Android support. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: experimental Android API and prerequisites. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  5. Market practice

    WebView2 (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes testing a WebView2 desktop app on Windows. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 5 sources
  1. Market practice

    Service Workers (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Explains service workers, offline use and why request interception can miss requests. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    BrowserContext (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: clearPermissions, grantPermissions and storageState options. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes offline emulation and what it covers. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: clearPermissions, grantPermissions and storageState options. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  3. Market practice

    Electron (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Electron application lifecycle. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes experimental Electron support. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Electron application lifecycle. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Android (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: experimental Android API and prerequisites. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes experimental Android support. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: experimental Android API and prerequisites. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  5. Market practice

    WebView2 (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes testing a WebView2 desktop app on Windows. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.