Bug 211330

Summary: [WebDriver][GTK] Some tests fails to click elements because element is outside visible rect
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, bugs-noreply, cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=210206
https://bugs.webkit.org/show_bug.cgi?id=193684

Description Lauro Moura 2020-05-01 21:08:00 PDT
List of tests:

  imported/selenium/py/test/selenium/webdriver/common/correct_event_firing_tests.py::testShouldFireClickEventWhenClicking[WebKitGTK]
  imported/selenium/py/test/selenium/webdriver/common/correct_event_firing_tests.py::testShouldFireMouseDownEventWhenClicking[WebKitGTK]
  imported/selenium/py/test/selenium/webdriver/common/correct_event_firing_tests.py::testShouldFireMouseUpEventWhenClicking[WebKitGTK]
  imported/selenium/py/test/selenium/webdriver/common/correct_event_firing_tests.py::testShouldIssueClickEvents[WebKitGTK]

All of them failing with some click events not being delivered. Running the test page in the MiniBrowser shows the elements not being visible. After changing the default size of MiniBrowser to, e.g. 1024x768, the test passes.
Comment 1 Lauro Moura 2020-05-05 22:31:21 PDT
Some other tests are passing if we create the window large enough:

* imported/selenium/py/test/selenium/webdriver/common/alerts_tests.py::testShouldHandleAlertOnPageLoad
* imported/selenium/py/test/selenium/webdriver/common/visibility_tests.py::testShouldModifyTheVisibilityOfAnElementDynamically
* imported/selenium/py/test/selenium/webdriver/common/webdriverwait_tests.py::testExpectedConditionElementToBeClickable
* imported/selenium/py/test/selenium/webdriver/common/webdriverwait_tests.py::testExpectedConditionVisibilityOf
* imported/selenium/py/test/selenium/webdriver/common/webdriverwait_tests.py::testExpectedConditionVisibilityOfElementLocated
* imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py::testThatAccessingFindingAnElementAfterWindowIsClosedAndHaventswitchedDoesntCrash
Comment 2 Lauro Moura 2020-05-06 21:48:10 PDT
In the WebDriver spec for the click[1]:

> The Element Click command scrolls into view the element if it is not already pointer-interactable, and clicks its in-view center point. 

Maybe related to bug193684 instead of a window sizing issue.

https://w3c.github.io/webdriver/#dfn-element-click
Comment 3 Carlos Garcia Campos 2020-06-19 04:56:01 PDT
These tests seem to be passing now
Comment 4 Lauro Moura 2020-06-19 09:45:48 PDT
Committed r263273: <https://trac.webkit.org/changeset/263273>
Comment 5 Radar WebKit Bug Importer 2020-06-19 09:46:21 PDT
<rdar://problem/64534495>