def test_take_element_screenshot_full_screen(browser, app_url):
    """Should resize the window before taking screenshot of the element"""
    browser.visit(app_url)

    elem = browser.find_by_tag("body")
    filename = elem.screenshot(name="foobar", full=True)
    assert tempfile.gettempdir() in filename
Should resize the window before taking screenshot of the element
tests/tests_webdriver/test_screenshot.py