Skip to content

Commit 658f56d

Browse files
juangjjleyba
authored andcommitted
Set default values for the pointerMove offset. (#4966)
This allows callers to omit the x and y parameters when moving the pointer to the center of the target, consistent with the old API.
1 parent 0ae8e3c commit 658f56d

File tree

1 file changed

+3
-3
lines changed
  • javascript/node/selenium-webdriver/lib

1 file changed

+3
-3
lines changed

javascript/node/selenium-webdriver/lib/input.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,14 @@ class PointerSequence extends Sequence {
503503
* {@linkplain ./webdriver.WebElement WebElement}.
504504
*
505505
* @param {{
506-
* x: number,
507-
* y: number,
506+
* x: (number|undefined),
507+
* y: (number|undefined),
508508
* duration: (number|undefined),
509509
* origin: (!Origin|!./webdriver.WebElement|undefined),
510510
* }} options the move options.
511511
* @return {!PointerSequence} a self reference.
512512
*/
513-
pointerMove({x, y, duration = 100, origin = Origin.VIEWPORT}) {
513+
pointerMove({x = 0, y = 0, duration = 100, origin = Origin.VIEWPORT}) {
514514
this.actions_.push({
515515
type: ActionType.POINTER_MOVE,
516516
origin,

0 commit comments

Comments
 (0)