[Webkit-unassigned] [Bug 183284] New: Automation: clicking on a disabled option element shouldn't produce an error

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 2 03:14:17 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=183284

            Bug ID: 183284
           Summary: Automation: clicking on a disabled option element
                    shouldn't produce an error
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebDriver
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bburg at apple.com, mcatanzaro at igalia.com

This was expected by selenium, but the WebDriver spec says we should simply do nothing in those cases. This makes test imported/w3c/webdriver/tests/element_click/select.py::test_option_disabled to fail.


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

    def test_option_disabled(session):
        session.url = inline("""
            <select>
              <option disabled>foo
              <option>bar
            </select>""")
        option = session.find.css("option", all=False)
        assert not option.selected

>       option.click()

option     = <webdriver.client.Element object at 0x7f6f8c190b90>
session    = <webdriver.client.Session object at 0x7f6f8dfc7ad0>

WebDriverTests/imported/w3c/webdriver/tests/element_click/select.py:225: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py:25: in inner
    return func(self, *args, **kwargs)
WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py:659: in click
    self.send_element_command("POST", "click", {})
WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py:649: in send_element_command
    return self.session.send_session_command(method, url, body)
WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py:480: in send_session_command
    return self.send_command(method, url, body)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <webdriver.client.Session object at 0x7f6f8dfc7ad0>, method = 'POST', url = 'session/44ec919a-0f09-4b58-89fe-8b40d790c639/element/node-C12D1824-176A-4750-8493-871BC6C8E9B5/click'
body = {}

    def send_command(self, method, url, body=None):
        """
            Send a command to the remote end and validate its success.

            :param method: HTTP method to use in request.
            :param uri: "Command part" of the HTTP request URL,
                e.g. `window/rect`.
            :param body: Optional body of the HTTP request.

            :return: `None` if the HTTP response body was empty, otherwise
                the `value` field returned after parsing the response
                body as JSON.

            :raises ValueError: If the response body does not contain a
                `value` key.
            :raises error.WebDriverException: If the remote end returns
                an error.
            """
        response = self.transport.send(
            method, url, body,
            encoder=protocol.Encoder, decoder=protocol.Decoder,
            session=self)

        if response.status != 200:
>           raise error.from_response(response)
E           ElementNotSelectableException: element not selectable (400):

body       = {}
method     = 'POST'
response   = <Response status=400 error=<ElementNotSelectableException http_status=400>>
self       = <webdriver.client.Session object at 0x7f6f8dfc7ad0>
url        = 'session/44ec919a-0f09-4b58-89fe-8b40d790c639/element/node-C12D1824-176A-4750-8493-871BC6C8E9B5/click'

WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py:439: ElementNotSelectableException

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180302/f06e41bb/attachment.html>


More information about the webkit-unassigned mailing list