-
Notifications
You must be signed in to change notification settings - Fork 202
Proposal: Add facility to take a screenshot of whole document #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Whilst it is possible to take screenshots of the full document in certain drivers (e.g. geckodriver), we can’t standardise this because not all browsers can feasibly implement it. |
Why shouldn't they be able to? Rendering to a second, hidden viewport - certainly - is already implemented by all browsers. This technique is called "double buffering", or "multiple buffering". I don't know of any browser that doesn't have this already implemented. As a fall-back in the - really unlikely - case of a browser not being able to render a document in memory on a second, memory-only canvas, Please re-open for discussion and consideration. |
Isn't that just a dupe of issue #893? |
I don’t know why Chrome can’t support full document screenshots, but I have it on good authority that we can’t support it cross-browser. |
No, I don't think so. #893 is different. It deals with determining the right moment to take a normal screenshot of a fully loaded page. The moment after any JavaScript/CSS animations have done their job. IMHO, #893 is something that cannot be computed, because there is no "moment of final load". Think of rotating ads or carussels. With these, the page will never be finally loaded. See this example: |
The Chrome team actually is considering my suggestions: So I feel they also believe it's possible to create and save an off-screen image of whole documents. Please re-open this issue for consideration. I'd like to elaborate on the user stories here:User Story (1)Testing large enterprises' web sites, you usually have a large number of test cases to test. However, you don't want to have the tester record each and every test case over and over again on each and every device on the market. That would be a waste of time and manpower because test cases are identical for each device. They (should) only differ in screenshots and built-in file upload / file download functionality. So in order to create a reasonable and streamlined web site test automation for testing web sites, this is the suggested workflow:
User Story (2)A tester is supposed to record a log-in process on a device. Currently, a screenshot may look like this: In the course of testing the log-in functionality of the website, the tester is not interested or even aware of the remainder of the page.This is what the same page screenshot looked like if it would be taken by WebDriver using the suggested Take Whole Document Image functionality: Later on, some design guy adds a CSS rule to the website, targetting some other page. Accidentally this new rule also changes the previously tested page's footer color to light green (only) on IPhones: Without the requested full document screenshot ability, the designer's mistake will never be recognized. The website gets deployed and is run until eventually or randomly some user reports its inability to read the footer. |
See also: #1286 |
Currently, WebDriver only allows to take a screenshot of the current viewport.
This is not sufficient when testing CSS (cascading style sheets).
Changes to a CSS rule may affect regions anywhere on the document. Even regions that have not been in the focus while performing a test recording.
Please concider to add an action for taking a screenshot of the whole document (= Take Document Shot).
Following is the suggested workflow of taking a screenshot of the whole document:
Element.scrollWidth
)Element.scrollHeight
)The text was updated successfully, but these errors were encountered: