Implement mouse.click(x,y) (#131)

Closes #107
This commit is contained in:
JoelEinbinder
2017-07-25 16:05:23 -07:00
committed by Andrey Lushnikov
parent 2081c12317
commit 64968862db
4 changed files with 42 additions and 22 deletions

View File

@@ -66,9 +66,9 @@
+ [keyboard.sendCharacter(char)](#keyboardsendcharacterchar)
+ [keyboard.up(key)](#keyboardupkey)
* [class: Mouse](#class-mouse)
+ [mouse.click(x, y, [options])](#mouseclickx-y-options)
+ [mouse.down([options])](#mousedownoptions)
+ [mouse.move(x, y)](#mousemovex-y)
+ [mouse.press([options])](#mousepressoptions)
+ [mouse.up([options])](#mouseupoptions)
* [class: Dialog](#class-dialog)
+ [dialog.accept([promptText])](#dialogacceptprompttext)
@@ -679,6 +679,16 @@ Dispatches a `keyup` event.
### class: Mouse
#### mouse.click(x, y, [options])
- `x` <[number]>
- `y` <[number]>
- `options` <[Object]>
- `button` <[string]> `left`, `right`, or `middle`, defaults to `left`.
- `clickCount` <[number]> defaults to 1
- returns: <[Promise]>
Shortcut for [`mouse.move`](#mousemovexy), [`mouse.down`](#mousedownkey) and [`mouse.up`](#mouseupkey).
#### mouse.down([options])
- `options` <[Object]>
- `button` <[string]> `left`, `right`, or `middle`, defaults to `left`.
@@ -694,14 +704,6 @@ Dispatches a `mousedown` event.
Dispatches a `mousemove` event.
#### mouse.press([options])
- `options` <[Object]>
- `button` <[string]> `left`, `right`, or `middle`, defaults to `left`.
- `clickCount` <[number]> defaults to 1
- returns: <[Promise]>
Shortcut for [`mouse.down`](#mousedownkey) and [`mouse.up`](#mouseupkey).
#### mouse.up([options])
- `options` <[Object]>
- `button` <[string]> `left`, `right`, or `middle`, defaults to `left`.