e76ad56196952c80b2f8af5942b37b975b659338
[yaffs-website] / commands / mouse / hover.md
1 hover
2 ========
3 Hover command is basically a command to move the mouse to the page and element set by the command arguments.
4
5 **TODO: add link to find command documentation**
6
7 ##Command Request
8 ```json
9 {
10     "name": "hover",
11     "args": [1, 0]
12 }
13 ```
14 A successful hover or mouse move command has the following response:
15 ##Command Response
16 ```json
17 {
18     "response": {
19         "position": {
20             "x": 165,
21             "y": 59
22         }
23     }
24 }
25 ```
26 Where **x** and **y** are the coordinates where the mouse has been positioned.
27
28 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).