Closed Bug 874868 Opened 11 years ago Closed 10 years ago

Marionette screenshot is limited image size to viewport where we need a full canvas

Categories

(Remote Protocol :: Marionette, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: automatedtester, Assigned: automatedtester)

References

()

Details

Attachments

(3 files, 3 obsolete files)

From the spec

This command will take a screenshot of the current window. Implementations of the remote end should capture the entire DOM, even if this would require a user to scroll the browser window. That is, the returned PNG should have the same width and height as returned by a call to getSize of the BODY element and must contain all visible content on the page, and this should be done without resizing the browser window. If the remote end is unable to capture the entire DOM, then the part of the DOM currently displayed in UI of the browser must be captured without additional chrome such as scrollbars and browser chrome.
Note

One way to think of capturing the entire DOM is that the user has an infinitely large monitor and has resized the window to allow all content to be visible. One of those monitors would be very cool.

Nested frames must be sized as if the user has resized the window to the dimensions of the PNG being returned. This often means that not all potentially visible content within the nested frames is captured.

Remote ends must not attempt to track changes in window size as the screenshot is being taken. In particular this means that in the case of a page that makes use of "infinite scrolling" (where an AJAX call is used to populate additional content as the user scrolls down) or in some other way resizes content as the window size is changed only the content that was originally contained in the DOM when the command is executed will be captured.
Attached file image as a data uri
Marionette currently only shows the view port instead of the entire canvas which is different behaviour from WebDriver currently
Now that Marionette has very high exposure amongst Gaia it would really help out with debugging to have the whole screen.
Severity: normal → major
Assignee: nobody → dburns
Comment on attachment 8368961 [details] [diff] [review]
Make sure that Marionette takes a screenshot of the the entire content canvas;

Review of attachment 8368961 [details] [diff] [review]:
-----------------------------------------------------------------

Cool, thanks! Just remove the pdb lines and rerun Mn on try to make sure it works.

::: testing/marionette/client/marionette/tests/unit/test_screenshot.py
@@ +19,5 @@
>  
>      def testWeCanTakeAScreenShotEntireCanvas(self):
>          test_url = self.marionette.absolute_url('html5Page.html')
> +        self.marionette.navigate('https://developer.mozilla.org/en-US/docs/Web/API/Element.scrollWidth')
> +        import pdb; pdb.set_trace()

remove pdb lines
Attachment #8368961 - Flags: review?(mdas) → review+
Attachment #8368961 - Attachment is obsolete: true
Attachment #8369439 - Attachment is obsolete: true
Attached patch screenshot.patchSplinter Review
carrying r+ forward and making sure patch that landed is correct here
Attachment #8369445 - Attachment is obsolete: true
Attachment #8371024 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/21826d6c7d6e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: