def test_take_element_screenshot_with_prefix(browser, app_url):
    """Should add the prefix to the screenshot file name"""
    browser.visit(app_url)

    elem = browser.find_by_tag("body")
    filename = elem.screenshot(name="foobar")
    assert "foobar" in filename
Should add the prefix to the screenshot file name
tests/tests_webdriver/test_screenshot.py