Bug 1432864 - Unfocussing steps will target <body> element. r?automatedtester
The WebDriver Element Send Keys command is meant to run the HTML
unfocussing steps after clearing the element. When HTMLElement.blur()
is called on the root document element (<html>) it is the <body>
that is in focus when the unfocussing steps have run.
The same applies in the case of typing into an <iframe> element.
The controlling element of the <iframe> is the <body>, as this is
the element ath will receive focus should you blur the frame.
MozReview-Commit-ID: 19Ox3W9CF8O
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -583573,17 +583573,17 @@
"7d40a7641dbf04cd78f1dba630afa2e8d80dad13",
"wdspec"
],
"webdriver/tests/element_send_keys/__init__.py": [
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"
],
"webdriver/tests/element_send_keys/interactability.py": [
- "bd7cd6c009c86fe93c0e132c30fb9674413962d4",
+ "bd5d26173017dc3cbdc282809028639a7b4a214a",
"wdspec"
],
"webdriver/tests/element_send_keys/scroll_into_view.py": [
"fb192d5d1d93aa729b07cadcadfa630587bd0b39",
"wdspec"
],
"webdriver/tests/execute_async_script/user_prompts.py": [
"e31edd4537f9b7479a348465154381f5b18f938c",
@@ -583601,17 +583601,17 @@
"817011a8cdff7cfd7e445fb8ecb84e5d91f03993",
"wdspec"
],
"webdriver/tests/get_window_rect.py": [
"c9139c16aa950c734c776887d6a762b867790812",
"wdspec"
],
"webdriver/tests/interaction/element_clear.py": [
- "222a472b70c38e9178bdb64cc13a99053169a831",
+ "5c98f889dcb136df05befbae8af75bb8c71f5b23",
"wdspec"
],
"webdriver/tests/interaction/send_keys_content_editable.py": [
"9c071e60e1203cf31120f20874b5f38ba41dacc3",
"wdspec"
],
"webdriver/tests/interface.html": [
"6625887cfa7f461dc428c11861fce71c47bef57d",
@@ -583705,17 +583705,17 @@
"570274d59020c4d8d0b8ecd604660ee7d710a165",
"wdspec"
],
"webdriver/tests/support/__init__.py": [
"5a31a3917a5157516c10951a3b3d5ffb43b992d9",
"support"
],
"webdriver/tests/support/asserts.py": [
- "68bb420a9d85810c9fd8b6eaa569b855dfb83638",
+ "728d9f0f1ecce286790874dd4b78a284f411ce81",
"support"
],
"webdriver/tests/support/fixtures.py": [
"b9b62366cd60ae7167ad2d0efdf3790ae2e780a4",
"support"
],
"webdriver/tests/support/http_request.py": [
"cb40c781fea2280b98135522def5e6a116d7b946",
--- a/testing/web-platform/tests/webdriver/tests/element_send_keys/interactability.py
+++ b/testing/web-platform/tests/webdriver/tests/element_send_keys/interactability.py
@@ -41,17 +41,17 @@ def test_document_element_is_interactabl
element = session.find.css(":root", all=False)
result = session.find.css("input", all=False)
# By default body is the active element
assert_same_element(session, body, session.active_element)
response = send_keys_to_element(session, element, "foo")
assert_success(response)
- assert_same_element(session, element, session.active_element)
+ assert_same_element(session, body, session.active_element)
assert result.property("value") == "foo"
def test_iframe_is_interactable(session):
session.url = inline(iframe("""
<body onkeypress="document.getElementById('result').value += event.key">
<input type="text" id="result"/>
</body>
@@ -60,17 +60,17 @@ def test_iframe_is_interactable(session)
body = session.find.css("body", all=False)
frame = session.find.css("iframe", all=False)
# By default the body has the focus
assert_same_element(session, body, session.active_element)
response = send_keys_to_element(session, frame, "foo")
assert_success(response)
- assert_same_element(session, frame, session.active_element)
+ assert_same_element(session, body, session.active_element)
# Any key events are immediately routed to the nested
# browsing context's active document.
session.switch_frame(frame)
result = session.find.css("input", all=False)
assert result.property("value") == "foo"