Raise the browser the extension reported, and add a diagnostics script
focus.py raised the first browser in its list that happened to be running. On a machine with both Chrome and Edge installed that is a coin flip, and losing it is silent: coordinates measured from a tab in one browser, the click delivered into a window of the other. It presents as selectors failing for no reason. A VPS with both installed hit exactly this. The extension now reports which browser is hosting it, and that travels with the measurement, so the clicker raises the browser the coordinates actually came from. Asking for a browser that is not running now fails honestly instead of quietly raising a different one, and the verification step rejects the wrong browser coming forward. Chromium, Opera and Vivaldi are recognised alongside Chrome, Edge and Brave, on both platforms. diagnose.py answers the question a remote desktop makes hard: whether the mouse is really moving or the viewer simply is not drawing it. It moves the cursor and reads the position back from the OS, so the answer does not depend on anything being rendered, and it reports DPI mode, screen size, whether this is an RDP session, and whether the browser can be raised at all. Nothing is clicked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
731fafda0e
commit
3ac9fe060f
+3
-1
@@ -162,7 +162,9 @@ def perform(
|
||||
# A click on a background window is consumed activating it and never reaches
|
||||
# the page, so raise the browser immediately before pressing.
|
||||
if activate:
|
||||
focused = focus.ensure_frontmost()
|
||||
# Raise the browser the extension actually measured from, not whichever
|
||||
# one happens to be first in the list.
|
||||
focused = focus.ensure_frontmost(browser=found.get("browser"))
|
||||
say(focused.detail)
|
||||
if not focused.ok:
|
||||
raise StepError(
|
||||
|
||||
Reference in New Issue
Block a user