w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Clarify if "browsingContext.captureScreenshot" command with "origin=viewport" should take into account scrollbar dimensions #592

Open lutien opened 8 months ago

lutien commented 8 months ago

At the moment, it's not fully clear in the get the origin rectangle algorithm for the case of origin=viewport if we should take into account scrollbar dimensions when calculating the viewport width and height. The text says, that we should use VisualViewport width and height (which would mean not including scrollbar), but the width and height are linked to DOMRect (which would mean including scrollbar).

The WebDriver Classic spec refers to DOMRect. Where CDP, from what I've understood, seems to default to VisualViewport.

OrKoN commented 3 months ago

I think it probably makes sense to include the scrollbar(s) here. cc @sadym-chromium @Lightning00Blade wdyt?