docs(api.md): update returned value description (#3514)

This commit is contained in:
Vse Mozhet Byt 2018-11-09 04:33:22 +02:00 committed by Andrey Lushnikov
parent 79ec7a3fe5
commit 59e7e8c244

View File

@ -3055,7 +3055,7 @@ If `key` is a single character and no modifier keys besides `Shift` are being he
#### elementHandle.screenshot([options])
- `options` <[Object]> Same options as in [page.screenshot](#pagescreenshotoptions).
- returns: <[Promise]<[string]|[Buffer]>> Promise which resolves to buffer with captured screenshot.
- returns: <[Promise]<[string]|[Buffer]>> Promise which resolves to buffer or a base64 string (depending on the value of `options.encoding`) with captured screenshot.
This method scrolls element into view if needed, and then uses [page.screenshot](#pagescreenshotoptions) to take a screenshot of the element.
If the element is detached from DOM, the method throws an error.