def test_cant_switch_to_frame(browser, app_url):
    """lxml-based drivers should not be able to switch to frames"""
    browser.visit(app_url)
    with pytest.raises(NotImplementedError) as err:
        browser.get_iframe("frame_123")
        browser.fail()

    assert f"{browser.driver_name.lower()} doesn't support frames." == err.value.args[0]
lxml-based drivers should not be able to switch to frames
tests/test_all_lxml_drivers/test_lxml_drivers.py