Re: Proposal - change takesElementScreenshot to use takeScreenshot with a parameter

As it stands, the takeScreenshot command names mirror the same pattern as
the findElement command names (which, for reference, are "findElement" and
"findChildElement" in the case of a single element). I'd like to maintain
consistency in the way that command names are structured.

If the consensus here is to adopt this model for screenshot, we should
apply it consistently throughout the spec.

FTR, I'm ambivalent about the change, and we've got mechanisms in place in
selenum to allow us to allow us to make changes to the protocol (at least
in the code that we control)


On Wed, Jan 23, 2013 at 3:13 PM, David Burns <> wrote:

>  I would like to propose that 16.3 use the same method as in 16.2 and that
> 16.2 take an additional parameter of the element ID.
> e.g.
>   Command Name takesScreenshot  Parameters "sessionId" {string} The key
> that identifies which session this request is for.
> "elementId" {string} The key that identifies which WebElement must be
> captured
>   Return Value {string} A Base64 encoded, lossless PNG of the current
> window.  Errors WebDriverException if the screenshot cannot be taken.
> This will simplify code for the remote end and will just be an extension
> to the current URL in the JSON Wire Protocol to *
> /session/:sessionId/screenshot/:id*
> David

Received on Wednesday, 23 January 2013 15:47:42 UTC