Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update the default interval in clickAndDrag #226

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}