378c70e236b076407753680be877d2c5ffd74ff2
[yaffs-website] / vendor / jcalderonzumba / gastonjs / docs / api / commands / mouse / double_click.md
1 double_click
2 ========
3 Sends a double_click event to the browser, this event is sent as if it comes as part of the user interaction, meaning is not a synthetic [DOM event](http://www.w3.org/TR/DOM-Level-2-Events/events.html).
4
5 In order to send a click you have to send the page and the element id where you want to click.
6
7 **TODO: add link to find command documentation**
8
9 ##Command Request
10 ```json
11 {
12     "name": "double_click",
13     "args": [1, 0]
14 }
15 ```
16 A successful double_click command has the following response:
17 ##Command Response
18 ```json
19 {
20     "response": {
21         "position": {
22             "x": 165,
23             "y": 59
24         }
25     }
26 }
27 ```
28 Where **x** and **y** are the coordinates where the double_click was done.
29
30 You need coordinates to click because that is how PhantomJS works, for more info check [PhantomJS native events](http://phantomjs.org/api/webpage/method/send-event.html).