Skip to content

Commit

Permalink
fix: Update the default interval in clickAndDrag (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Nov 21, 2023
1 parent d53a45f commit d9f2957
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ endElementId | string | no | Same as in [windows: click](#windows-click) | 123e4
endX | number | no | Same as in [windows: click](#windows-click) | 100
endY | number | no | Same as in [windows: click](#windows-click) | 100
modifierKeys | string[] or string | no | Same as in [windows: click](#windows-click) | win
durationMs | number | no | The number of milliseconds to wait between pressing the left mouse button and moving the cursor to the ending drag point. 500ms by default. | 700
durationMs | number | no | The number of milliseconds to wait between pressing the left mouse button and moving the cursor to the ending drag point. 5000ms by default. | 7000

### windows: hover

Expand Down
4 changes: 2 additions & 2 deletions lib/commands/gestures.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ commands.windowsScroll = async function windowsScroll (opts) {
* depress while the drag is being performed. Supported key names are: Shift, Ctrl, Alt, Win.
* For example, in order to keep Ctrl+Alt depressed while clicking, provide the value of
* ['ctrl', 'alt']
* @property {number} durationMs [500] The number of milliseconds to wait between pressing
* @property {number} durationMs [5000] The number of milliseconds to wait between pressing
* the left mouse button and moving the cursor to the ending drag point.
*/

Expand All @@ -437,7 +437,7 @@ commands.windowsClickAndDrag = async function windowsClickAndDrag (opts) {
endElementId,
endX, endY,
modifierKeys,
durationMs = 500,
durationMs = 5000,
} = opts ?? {};

const screenSize = await getVirtualScreenSize();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"semantic-release": "^22.0.5",
"sinon": "^17.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"typescript": "~5.2",
"webdriverio": "^8.0.2"
}
}

0 comments on commit d9f2957

Please sign in to comment.