From 3ecac535a929f49bbac60647c3e5f268bee9e992 Mon Sep 17 00:00:00 2001 From: Vishnu Vardhan Date: Mon, 19 Oct 2026 17:15:39 +0530 Subject: [PATCH] docs(selenium-devtools): describe the Safari focus handling the adapter has The Limitations bullet said the plugin runs `open -a Safari` once after the session starts. That is what the WDIO service, Nightwatch and the Python adapter do; the Selenium adapter instead switches to the session's own window before each element input when it has lost focus, and opens the dashboard behind Safari on macOS. Users reading the README were told about a mechanism this adapter does not use. Co-Authored-By: Claude Opus 5.5 --- packages/selenium-devtools/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/selenium-devtools/README.md b/packages/selenium-devtools/README.md index 404420a1..05e9f1e8 100644 --- a/packages/selenium-devtools/README.md +++ b/packages/selenium-devtools/README.md @@ -487,7 +487,7 @@ Same script and post-processing (`applyPerformanceData`) used by `@wdio/devtools ## Limitations -- **Safari in live mode must stay the frontmost window.** Safari delivers synthesized mouse input only to its frontmost window and still reports the click as successful, so a click issued while the dashboard or any other window is in front reaches nothing. The plugin brings Safari back to the front after the session starts (`open -a Safari`, macOS only); clicking the dashboard while the test is running hands focus away again and the clicks that follow are lost until Safari is in front once more. Trace mode opens no window and is not affected. +- **Safari in live mode must stay the frontmost window.** Safari delivers synthesized mouse input only to its frontmost window and still reports the click as successful, so a click issued while the dashboard or any other window is in front reaches nothing. Before each element click, `sendKeys`, `clear` or `submit` on a Safari session, the plugin switches to the session's own window when it has lost focus (top-level document only, not inside a frame), and on macOS it opens the dashboard behind Safari. Still avoid clicking into other windows, the dashboard included, during a live Safari run. Trace mode opens no window and is not affected. | Limitation | Detail | |-----------|--------|