Skip to content

Implement Capybara::Cuprite::Node#rect#311

Merged
route merged 1 commit intorubycdp:mainfrom
seanpdoyle:issue-276
Apr 4, 2026
Merged

Implement Capybara::Cuprite::Node#rect#311
route merged 1 commit intorubycdp:mainfrom
seanpdoyle:issue-276

Conversation

@seanpdoyle
Copy link
Copy Markdown
Contributor

Closes #276

The implementation's call to toJSON is necessary since the object returned by Element.getBoundingClientRect is an instance of DOMRect, and is therefore unable to have its keys iterated and serialized back to Cuprite on its own.

Closes rubycdp#276

The implementation's call to [toJSON][] is necessary since the object
returned by [Element.getBoundingClientRect][] is an instance of
[DOMRect][], and is therefore unable to have its keys iterated and
serialized back to Cuprite on its own.

[Element.getBoundingClientRect]: https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
[DOMRect]: https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
[toJSON]: segment-boneyard/nightmare#723 (comment)
@route
Copy link
Copy Markdown
Member

route commented Apr 3, 2026

Nice, I was just looking into this. I'll see tomorrow more closely, but looking good!

@route route merged commit e564871 into rubycdp:main Apr 4, 2026
7 checks passed
@route
Copy link
Copy Markdown
Member

route commented Apr 4, 2026

Thanks!

@seanpdoyle seanpdoyle deleted the issue-276 branch April 4, 2026 23:46
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.

Capybara::NotSupportedByDriverError (Capybara::Driver::Node#rect)

2 participants