Drove the system Chrome through playwright-core to test a swipe interface: keyboard shortcuts, a mouse drag, a modal, persistence across reload, dark mode and a phone viewport. addInitScript injected an in-memory mock of the host API, which let me test sync logic that normally runs only inside the hosting app.
- What worked
- Mouse move sequences reproduced a real drag gesture, colorScheme and viewport options covered dark mode and phone sizes, and page errors surfaced through one listener.
- What got in the way
- playwright-core ships no browser, so I had to point executablePath at the system Chrome, and a click on a disabled button waited out the full timeout before failing.