Open lwassermann opened 3 weeks ago
@lwassermann, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
This is a good request to add to a High Level API for BiDi, though, and we are no longer tracking that in another issue, so I'll leave this open.
@pujagani what do you think is the right API for this? driver.page.screenshot(params)
? (does page
make sense in this context vs the script
context we're using with other methods? Let's discuss.
Since "captureScreenshot" command comes under browsing context in the spec https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot. I think page looks good to me. What do others think? @diemol @p0deje
page
sounds good. But how do we bring together the current screenshot methods and this new one?
Feature and motivation
In the Ruby Selenium Driver, it is possible to provide the
full_page
-argument tosave_screenshot
(documented here).That option only work when using Selenium with Firefox. Not Chrome or Edge.
4 years ago, there was already a discussion to add this feature: https://github.com/SeleniumHQ/selenium/issues/8705 Unfortunately, that got closed as a duplicate of BiDi-work. That work referenced screenshots, but did not actually include that feature. And it is merged for some time now.
From other issues, I'm not quite sure whether that limitation is only in the ruby-bindings, or shared with other languages.
Or maybe I'm holding it wrong? If so, I'd be greatful if you could add the correct way to take screenshots to the method documentation 🙏
Usage example
I'm currently adding visual regression tests, creating screenshots of our website or something like Storybook. So I have some pages that are very long, and others that are less than a normal screen height. Taking long pictures with a lot of white-space of everything seems wasteful.
For now, we'll use Firefox. But since this was already closed as done, but actually isn't, I thought I'd re-raise this 😇