Skip to content

Commit 4767d04

Browse files
committed
Correct the docs: a second driver is refused, and has been for a while
The README told readers nothing stopped two clients driving one device, and the Playwright config repeated it in a comment. Both predate inputOwners. The claim is not merely stale but actively misleading: someone reading it would design around a hazard we already handle, and would have no warning about the two real consequences — that an open console tab holds the device against their own test run, and that a client which dies without closing its socket keeps the claim until the server restarts.
1 parent 28f1c31 commit 4767d04

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ on durable selectors.
107107
the effect. Tests should prove the app is taking input before relying on it.
108108
- **Two-finger gestures are dropped on Android.** They work on iOS; there is no mapping for them
109109
in the Android driver, and they are discarded rather than guessed at.
110-
- **Nothing refuses a second driver** on the same device yet.
110+
- **A device serves one driver at a time**, and a second claim is refused rather than shared.
111+
That includes the console: a browser tab left open on a device will refuse your test run,
112+
and only the refused side is told why. There is no keepalive yet, so a client that dies
113+
without closing its socket holds the device until the server restarts.
111114
- Relaunching an app does not reset its state.
112115

113116
## Licence

‎examples/playwright/playwright.config.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { defineConfig } from '@playwright/test';
66
export default defineConfig({
77
testDir: './tests',
88
// A device serves one driver at a time. Playwright parallelises across
9-
// files by default, which points two specs at the same simulator and
10-
// has them fight over it — each passes alone and the pair fails
11-
// together. DeviceDeck does not yet refuse a second claim, so the
12-
// constraint has to be honoured here.
9+
// files by default, which points two specs at the same simulator;
10+
// DeviceDeck refuses the second claim, so the run fails loudly rather
11+
// than interleaving touches into nonsense. Loud is better than silent,
12+
// but it still fails — so keep the worker count at one.
1313
workers: 1,
1414
fullyParallel: false,
1515
timeout: 60_000,

0 commit comments

Comments
 (0)