Skip to content

Commit

Permalink
Fix comments on Java Actions.moveToElement (#6974)
Browse files Browse the repository at this point in the history
According to https://w3c.github.io/webdriver/#dfn-center-point step 1,
the element center point is calculated by getClientRects.

Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk>
  • Loading branch information
JohnChen0 and AutomatedTester committed Apr 6, 2020
1 parent f6366fc commit 0380a6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/client/src/org/openqa/selenium/interactions/Actions.java
Expand Up @@ -351,7 +351,7 @@ public Actions doubleClick() {

/**
* Moves the mouse to the middle of the element. The element is scrolled into view and its
* location is calculated using getBoundingClientRect.
* location is calculated using getClientRects.
* @param target element to move to.
* @return A self reference.
*/
Expand All @@ -365,7 +365,7 @@ public Actions moveToElement(WebElement target) {

/**
* Moves the mouse to an offset from the center of the element.
* The element is scrolled into view and its location is calculated using getBoundingClientRect.
* The element is scrolled into view and its location is calculated using getClientRects.
* @param target element to move to.
* @param xOffset Offset from the center. A negative value means coordinates left from
* the element.
Expand Down

0 comments on commit 0380a6c

Please sign in to comment.