webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Proposing a get endpoint for Take Screenshot that with fullpage option

Open k7z45 opened this issue 5 years ago • 10 comments

Due to the high demand from https://bugs.chromium.org/p/chromedriver/issues/detail?id=294, come up with initial proposal for the spec


Preview | Diff

k7z45 avatar Jul 16 '20 17:07 k7z45

geckodriver supports this, but it's a new endpoint rather than a parameter (…/screenshot/full). Since the existing endpoint is a GET and we don't have other cases that use parameters on the GET, that design would make more sense to me.

jgraham avatar Jul 17 '20 11:07 jgraham

Thanks for the comment, made the change accordingly.

k7z45 avatar Jul 17 '20 19:07 k7z45

Note that merging this also requires some web-platform-tests to be submitted/approved for the feature.

Will work on web-platform-tests once I have "verbal" approval for this.

k7z45 avatar Jul 20 '20 22:07 k7z45

Hi @k7z45 — in order to accept this PR we need to make our tooling recognize that you’re already a participant in the Browser Testing and Tools Working Group.

You can do that by using https://www.w3.org/users/myprofile to log into your W3C account — and from there, follow the Connected Accounts link in the sidebar to connect your W3C account with your GitHub account.

If you don’t remember your W3C username or password, you can use https://www.w3.org/accounts/recover to recover them.

sideshowbarker avatar Jul 21 '20 01:07 sideshowbarker

Thanks Michael! Just did that.

k7z45 avatar Jul 21 '20 01:07 k7z45

Thanks @k7z45 — https://labs.w3.org/repo-manager/pr/id/w3c/webdriver/1536 shows this is now green for the IPR check

sideshowbarker avatar Jul 21 '20 01:07 sideshowbarker

Hi @jgraham , PTAL pending review web-platform-tests: https://github.com/web-platform-tests/wpt/pull/26652 for the feature.

k7z45 avatar Nov 26 '20 00:11 k7z45

I'm interested in bringing this functionality to WebDriver BiDi. Whether it belongs here in WebDriver "classic" is not a topic I can comment on, but I'm interested in learning if the normative text proposed here is viable for either spec.

Specifically, I haven't found any implementer's perspective on @jgraham's 2021 comment:

One challenge is that the fullPage option may not be trivial to specify; I think we skipped it for WebDriver Classic but in practice implementations have it, although I don't know they all work the same The typical kind of problem is "what if you haven't already rendered the whole page, but just some tiles. Then you might need to simulate scrolling to render the whole page, but what about position:fixed headers, or content that changes duirng scroll". So really you want "render the entire current layout tree as if the viewport length was unbounded", but that might not actually be a thing that's supported in engines.

@chrishtr you and I investigated a Chrome rendering bug a number of years ago; is there any chance you could weigh in here or perhaps refer me to someone more appropriate?

@juliandescottes could you direct me to a subject-matter expert at Mozilla?

jugglinmike avatar Sep 12 '23 17:09 jugglinmike

For Chrome there is https://bugs.chromium.org/p/chromium/issues/detail?id=770769&desc=2 which at least for headless seems to still limit the maximum height to 16384px.

For Firefox we currently have the limit set to 32767px for both height and width, and a maximum texture size of 472907776.

As of now we do not have problems in capturing full page screenshots for pages exceeding the visible viewport.

whimboo avatar Sep 12 '23 18:09 whimboo

Note that we will discuss the full screenshot feature for BiDi during the TPAC sessions on Thursday or Friday this week.

whimboo avatar Sep 12 '23 18:09 whimboo