Changeset 252180 in webkit
- Timestamp:
- Nov 7, 2019 4:09:12 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebDriver/ChangeLog
r248846 r252180 1 2019-11-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: correctly handle errors when focusing element before sending key events 4 https://bugs.webkit.org/show_bug.cgi?id=203945 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 We are throwing an exception that is not correctly handled. 9 10 Fixes: imported/w3c/webdriver/tests/element_send_keys/interactability.py::test_not_a_focusable_element 11 imported/w3c/webdriver/tests/element_send_keys/interactability.py::test_display_none 12 imported/w3c/webdriver/tests/element_send_keys/interactability.py::test_visibility_hidden 13 imported/w3c/webdriver/tests/element_send_keys/interactability.py::test_hidden 14 imported/w3c/webdriver/tests/element_send_keys/interactability.py::test_disabled 15 16 * Session.cpp: 17 (WebDriver::Session::elementSendKeys): Raise ElementNotInteractable error when element is not focusable. 18 1 19 2019-08-18 Yusuke Suzuki <ysuzuki@apple.com> 2 20 -
trunk/Source/WebDriver/Session.cpp
r245567 r252180 1757 1757 " element.focus();" 1758 1758 " let tagName = element.tagName.toUpperCase();" 1759 " if (tagName === 'BODY' || element === document.documentElement)" 1760 " return;" 1759 1761 " let isTextElement = tagName === 'TEXTAREA' || (tagName === 'INPUT' && element.type === 'text');" 1760 1762 " if (isTextElement && element.selectionEnd == 0)" 1761 1763 " element.setSelectionRange(element.value.length, element.value.length);" 1762 1764 " if (element != doc.activeElement)" 1763 " throw new Error('cannot focus element');"1765 " throw {name: 'ElementNotInteractable', message: 'Element is not focusable.'};" 1764 1766 "}"; 1765 1767 -
trunk/Source/WebKit/ChangeLog
r252175 r252180 1 2019-11-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: correctly handle errors when focusing element before sending key events 4 https://bugs.webkit.org/show_bug.cgi?id=203945 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 Handle ElementNotInteractable JavaScript exception to generate the appropriate Automation error. 9 10 * WebProcess/Automation/WebAutomationSessionProxy.cpp: 11 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): 12 1 13 2019-11-06 Eric Liang <ericliang@apple.com> 2 14 -
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
r248713 r252180 292 292 else if (exceptionName == "InvalidSelector") 293 293 errorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::InvalidSelector); 294 else if (exceptionName == "ElementNotInteractable") 295 errorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::ElementNotInteractable); 294 296 295 297 JSValueRef messageValue = JSObjectGetProperty(context, const_cast<JSObjectRef>(exception), OpaqueJSString::tryCreate("message"_s).get(), nullptr); -
trunk/WebDriverTests/ChangeLog
r239824 r252180 1 2019-11-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: correctly handle errors when focusing element before sending key events 4 https://bugs.webkit.org/show_bug.cgi?id=203945 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 Remove expectations for tests that are now passing. 9 10 * TestExpectations.json: 11 1 12 2019-01-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/WebDriverTests/TestExpectations.json
r239824 r252180 543 543 "subtests": { 544 544 "test_document_element_is_interactable": { 545 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/188545"}}546 },547 "test_not_a_focusable_element": {548 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/188545"}}549 },550 "test_not_displayed_element": {551 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/188545"}}552 },553 "test_hidden_element": {554 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/188545"}}555 },556 "test_disabled_element": {557 545 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/188545"}} 558 546 }
Note: See TracChangeset
for help on using the changeset viewer.