def test_take_screenshot(browser, app_url):
    """Should take a screenshot of the current page"""
    browser.visit(app_url)

    filename = browser.screenshot()
    assert tempfile.gettempdir() in filename
Should take a screenshot of the current page
tests/tests_webdriver/test_screenshot.py