fix(ElementHandle.screenshot): account for scroll (#1323)

Currently, `elementHandle.screenshot` passes bounding box into the `page.captureScreenshot` 
method.
This is wrong since `captureScreenshot` accepts viewport, not bounding box.

This patch uses layout metrics to convert bounding box into viewport.

Fixes #1315.
This commit is contained in:
Christopher Dieringer
2017-11-10 16:02:52 -08:00
committed by Andrey Lushnikov
parent 2c8f658815
commit b0b22199f9
3 changed files with 29 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B