[Webkit-unassigned] [Bug 174710] New: WebDriver: handle click events on option elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 21 06:08:38 PDT 2017


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

            Bug ID: 174710
           Summary: WebDriver: handle click events on option elements
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bburg at apple.com, cdumez at apple.com, joepeck at webkit.org

The spec explicitly says we should handle clicks on option elements in a different way. If the option item is a child of a select that allows multiple items, we should actually toggle the item selected state. See https://www.w3.org/TR/webdriver/#element-click. The main problem we have here is that client rects don't work at all for option elements in WebKit, so we are currenly always clicking at 0,0 for option elements. I guess it's because in WebKit option elements don't have a renderer, the thing is that it works in firefox and chromium. If we manage to make clicks work on option elements, maybe we can simply add Meta/Ctrl modifier to the mouse event when the option element should be toggled, since Meta/Ctrl + Click is indeed the desired behavior. I think this is causing several tests to fail, at least testIsSelectedAndToggle is failing sor sure because of this.

selenium/webdriver/common/api_example_tests.py F
================================================================================== short test summary info ===================================================================================
FAIL selenium/webdriver/common/api_example_tests.py::testIsSelectedAndToggle[WebKitGTK]

========================================================================================== FAILURES ==========================================================================================
_____________________________________________________________________________ testIsSelectedAndToggle[WebKitGTK] _____________________________________________________________________________

driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="4da33091-8ace-4991-bb2e-61c1c48d2dc4")>, pages = <conftest.Pages object at 0x7fa80ea2b950>

    def testIsSelectedAndToggle(driver, pages):
        pages.load("formPage.html")
        elem = driver.find_element_by_id("multi")
        option_elems = elem.find_elements_by_xpath("option")
        assert option_elems[0].is_selected()
        option_elems[0].click()
>       assert not option_elems[0].is_selected()
E       assert not True
E        +  where True = <bound method WebElement.is_selected of <selenium.webdriver.remote.webelement....4991-bb2e-61c1c48d2dc4", element="node-21CE8204-45CE-4C7C-AF6D-BF0B6A75D0D3")>>()
E        +    where <bound method WebElement.is_selected of <selenium.webdriver.remote.webelement....4991-bb2e-61c1c48d2dc4", element="node-21CE8204-45CE-4C7C-AF6D-BF0B6A75D0D3")>> = <selenium.webdriver.remote.webelement.WebElement (session="4da33091-8ace-4991-bb2e-61c1c48d2dc4", element="node-21CE8204-45CE-4C7C-AF6D-BF0B6A75D0D3")>.is_selected

selenium/webdriver/common/api_example_tests.py:178: AssertionError

-- 
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/20170721/e831784a/attachment-0001.html>


More information about the webkit-unassigned mailing list