ZestClientTakeScreenshot

0 views
Skip to first unread message

Simon Bennetts

unread,
Jan 22, 2015, 1:21:44 PM1/22/15
to mozill...@googlegroups.com
Just had a good suggestion to add the ability to take client screenshots via Zest.
This is supported by some WebDriver implementations, so is not difficult to implement.
My proposal is we add an element:

{
      "windowHandle": "win1",
      "filename": "screenshot.png",
      "index": 3,
      "enabled": true,
      "elementType": "ZestClientTakeScreenshot"
}

Where windowHandle is mandatory but filename is not - if its not supplied then Zest should give a default name, I'm using <site>-<timestamp>.png, eg www.google.co.uk-1421948330800.png
If the selected browser doesnt support screenshots then it should just ignore the command, optionally printing out a warning message.

What we will need to add is the concept of an output directory, so that any calling program can set it to something sensible.
I'm adding get/setOutputDirectory calls to the ZestRuntime.

I've done the basic implementation and it seems to work fine.

Any objections to me adding this in, or suggestions for making it better?

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages