Add MouseDown/MouseUp methods to InteractiveBrowser interface #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
InteractiveBrowserinterface currently hasMouseClick(which does mousedown+mouseup at the same position),MouseMove, andMouseWheel. However, there's no way to perform a drag operation, which requires:MouseDownat position AMouseMoveto position BMouseUpat position BThis is needed for slider captchas (e.g., DataDome's GeeTest slider used by NYT) where the user must drag a slider handle from left to right.
Proposed Change
Add two new methods to
InteractiveBrowser:Implementation would use Playwright's existing
page.Mouse().Down()andpage.Mouse().Up():Context
Mort's captcha proxy and browser proxy use
InteractiveBrowserfor remote browser control. Without drag support, users cannot solve slider captchas through the proxy. The mort-side changes (JS client + Go handler) are ready and will use an optional interface check so they work automatically once this is implemented.Starting work on this. Plan: add
MouseDownandMouseUpto theInteractiveBrowserinterface and implement them oninteractiveBrowser, following the pattern from the issue description. Will also update the mock inpromote_test.go.Done. PR #80 has been merged. Added
MouseDownandMouseUpto theInteractiveBrowserinterface and implementation.Resolved —
MouseDownandMouseUpare now part ofInteractiveBrowser. Updated mort in PR steve/mort#862 to use them directly for drag gesture support (slider captchas).