def test_can_work_on_iframes_by_id(browser, app_url):
    """can work on iframes and switch back to the page"""
    browser.visit(app_url)

    with browser.get_iframe("iframemodal") as frame:
        value = frame.find_by_tag("h1").value
        assert "IFrame Example Header" == value

    value = browser.find_by_tag("h1").value
    assert "Example Header" == value
can work on iframes and switch back to the page
tests/tests_webdriver/test_iframes.py