Closed Bug 912251 Opened 11 years ago Closed 11 years ago

Implement `Client#screenshot`

Categories

(Testing Graveyard :: JSMarionette, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jugglinmike, Assigned: jugglinmike)

References

Details

Attachments

(1 file, 1 obsolete file)

Implement the `screenshot` method according to the Python API documentation [1]:

> Marionette.screenshot(element=None, highlights=None)
> Creates a base64-encoded screenshot of the element, or the current frame if no element is specified.
> Parameters:	
>  element – The element to take a screenshot of. If None, will take a screenshot of the current frame.
>  highlights – A list of HTMLElement objects to draw a red box around in the returned screenshot.

[1] https://marionette_client.readthedocs.org/en/latest/#marionette.Marionette.screenshot
Attached patch 912251-screenshot.patch (obsolete) — Splinter Review
This is a work-in-progress patch. I won't be able to fully verify its correctness until Bug 912244 lands.
Blocks: 912611
I've created Bug 912611 in order to isolate the aspect of this work that is blocked by bug 912244. This will allow us to land the basic screenshot functionality in the JavaScript client in advance of the `highlights` work propagating downstream.
No longer depends on: 912244
I've also submitted this patch as a pull request on GitHub:

https://github.com/mozilla-b2g/marionette-js-client/pull/53
Attachment #799166 - Attachment is obsolete: true
Attachment #799678 - Flags: review?(jlal)
Comment on attachment 799678 [details] [diff] [review]
912251-screenshot-v2.patch

one nit- see github... Can you also release a new feature version and update the HISTORY.md (in a different commit).
Attachment #799678 - Flags: review?(jlal) → review+
master: https://github.com/mozilla-b2g/marionette-js-client/commit/d34c3e2bac16f43da0b507b51ff44d3bca4cee43

Incorporated James' feedback and released v0.14.0. Thanks, James!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: