Closed Bug 912611 Opened 11 years ago Closed 10 years ago

Implement `highlights` option of `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)

Currently, there is a bug in the Marionette server that prevents the `highlights` screenshot option from functioning correctly. Once bug 912244 is resolved, extend the `Client#screenshot` API to accept an optional array of elements to highlight.
Depends on: 952516
Hey Gareth,

I copied the documentation for this method from the equivalent method in the Python client: https://marionette_client.readthedocs.org/en/latest/#marionette.Marionette.screenshot
Attachment #8356241 - Flags: review?(gaye)
Comment on attachment 8356241 [details] [review]
Pull request on GitHub.com

LGTM! Once the server bug lands shall we also land an end-to-end test?
Attachment #8356241 - Flags: review?(gaye) → review+
I don't know if we can write a stable test for this behavior. I suppose we could navigate to a simple document served from the repo itself and screenshot that, but comparing expected base64 encodings would be susceptible to false negatives if the platform's compression algorithm changed. Maybe we can find a good image reference test library for Node...

Although even then, the logic for drawing the border (which specifies its width and color) lives in the Marionette server. Changes there would cause unexpected failures on our end (even with fuzzy tests).
master: https://github.com/mozilla-b2g/marionette-js-client/commit/fbffc548181ca4797e2dc9422e11c440bd56f58d

Thanks for the review, Gareth!
Status: NEW → RESOLVED
Closed: 10 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: