Skip to content

feat(node): accept wait: in Node#click to skip waiting for a navigation - #674

Merged
route merged 3 commits into
rubycdp:mainfrom
bensheldon:feat/node-click-wait
Nov 4, 2026
Merged

route merged 3 commits into
rubycdp:mainfrom
bensheldon:feat/node-click-wait

Conversation

@bensheldon

@bensheldon bensheldon commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Mouse#click accepts wait:, how long to watch for a navigation started by the click, but Node#click doesn't, so left clicks on a node always use Mouse::CLICK_WAIT. This adds wait: to Node#click with the same default and passes it through, e.g. node.click(wait: 0) to return as soon as the click is dispatched. Right and double clicks already pass wait: 0.

For discussion...

My eventual goal is to thread this through Cuprite as click(navigation_wait: 0) or similar, so a click can either skip the wait-for-navigation behavior or watch longer for a navigation that starts late (e.g. a submit handler that navigates after a fetch).

@route
route force-pushed the feat/node-click-wait branch from 0a9e598 to 8bd863b Compare November 4, 2026 19:08
@route

route commented Nov 4, 2026

Copy link
Copy Markdown
Member

I like it!

@route
route merged commit 7917ce7 into rubycdp:main Nov 4, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants