Bug 1410891 - Assert that "value" is in response. r?maja_zf
MozReview-Commit-ID: JR160fQzpt1
--- a/testing/web-platform/tests/webdriver/tests/element_retrieval/get_active_element.py
+++ b/testing/web-platform/tests/webdriver/tests/element_retrieval/get_active_element.py
@@ -10,16 +10,17 @@ def get_active_element(session):
def assert_is_active_element(session, response):
"""Ensure that the provided object is a successful WebDriver
response describing an element reference and that the referenced
element matches the element returned by the `activeElement`
attribute of the current browsing context's active document.
"""
assert response.status == 200
+ assert "value" in response.body
from_js = session.execute_script("return document.activeElement")
if response.body["value"] is None:
assert from_js is None
else:
assert_same_element(session, response.body["value"], from_js)