Bug 181644 - WebDriver: several element_send_keys tests are failing since added
Summary: WebDriver: several element_send_keys tests are failing since added
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-15 02:22 PST by Carlos Garcia Campos
Modified: 2018-08-13 23:50 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.98 KB, patch)
2018-08-13 04:30 PDT, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-01-15 02:22:31 PST
______________________________________________________________________ test_element_outside_of_not_scrollable_viewport _______________________________________________________________________

session = <webdriver.client.Session object at 0x7f3600204b50>

    def test_element_outside_of_not_scrollable_viewport(session):
        session.url = inline("<input style=\"position: relative; left: -9999px;\">")
        element = session.find.css("input", all=False)
    
        response = send_keys_to_element(session, element, "foo")
>       assert_success(response)

element    = <webdriver.client.Element object at 0x7f360003ef90>
response   = <Response status=400 error=<InvalidArgumentException http_status=400>>
session    = <webdriver.client.Session object at 0x7f3600204b50>

WebDriverTests/imported/w3c/webdriver/tests/element_send_keys/scroll_into_view.py:20: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response status=400 error=<InvalidArgumentException http_status=400>>, value = None

    def assert_success(response, value=None):
        """
        Verify that the provided webdriver.Response instance described
        a valid error response as defined by `dfn-send-an-error` and
        the provided error code.
    
        :param response: ``webdriver.Response`` instance.
        :param value: Expected value of the response body, if any.
        """
>       assert response.status == 200, str(response.error)
E       AssertionError: invalid argument (400):

response   = <Response status=400 error=<InvalidArgumentException http_status=400>>
value      = None

WebDriverTests/imported/w3c/webdriver/tests/support/asserts.py:83: AssertionError
Comment 1 Carlos Garcia Campos 2018-01-15 02:27:33 PST
Tests in imported/w3c/webdriver/tests/element_send_keys/interactability.py are failing with similar bt.
Comment 2 Carlos Garcia Campos 2018-08-13 04:22:07 PDT
This is because we are implementing an old version of the spec that received a "value" parameter to send keys command, instead of the "text" one.
Comment 3 Carlos Garcia Campos 2018-08-13 04:30:30 PDT
Created attachment 347010 [details]
Patch
Comment 4 EWS Watchlist 2018-08-13 04:32:47 PDT
Attachment 347010 [details] did not pass style-queue:


ERROR: Source/WebDriver/Session.h:109:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/Session.cpp:1720:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Carlos Garcia Campos 2018-08-13 23:49:37 PDT
Committed r234836: <https://trac.webkit.org/changeset/234836>
Comment 6 Radar WebKit Bug Importer 2018-08-13 23:50:16 PDT
<rdar://problem/43272647>