diff --git a/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py b/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py index 52aabca2670e45a..3c534cb41eea91f 100644 --- a/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py +++ b/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py @@ -76,6 +76,7 @@ async def test_params_locator_accessability_value_invalid_type( ("xpath", ""), ("innerText", ""), ("accessibility", {}) + ("context", {}) ]) async def test_params_locator_value_invalid_value(bidi_session, inline, top_context, type, value): await navigate_to_page(bidi_session, inline, top_context) diff --git a/webdriver/tests/bidi/browsing_context/locate_nodes/locator.py b/webdriver/tests/bidi/browsing_context/locate_nodes/locator.py index f2782509d93522c..6cbe799958a8ff2 100644 --- a/webdriver/tests/bidi/browsing_context/locate_nodes/locator.py +++ b/webdriver/tests/bidi/browsing_context/locate_nodes/locator.py @@ -236,3 +236,38 @@ async def test_locate_by_accessibility_attributes( ) recursive_compare(expected, result["nodes"]) + + +@pytest.mark.parametrize("domain", ["", "alt"], ids=["same_origin", "cross_origin"]) +@pytest.mark.asyncio +async def test_locate_by_context(bidi_session, inline, top_context, domain): + iframe_url_1 = inline("