testing/web-platform/tests/webdriver/tests/take_screenshot/__init__.py
author Andreas Tolfsen <ato@sny.no>
Wed, 09 Jan 2019 14:47:04 +0000
changeset 510184 76be2a9fde9e21b0955227521c98b4ca28781bbf
parent 502803 2da88ffb958837812826c793afee7fc83ff21767
child 510186 e7ed31dd6f7faa874ba0dc718e8a3c34fd650dc0
permissions -rw-r--r--
bug 1385706: marionette: fix WebDriver:TakeScreenshot to use viewport bounds; r=ato The WebDriver:TakeScreenshot command relied on the document element's clientWidth/clientHeight, but should according to the WebDriver specification use the viewport's dimensions. Thanks-to: JinaJita <jitajina@gmail.com>

def document_dimensions(session):
    return tuple(session.execute_script("return [window.innerWidth, window.innerHeight];"))