3 namespace Zumba\GastonJS\Browser;
6 * Trait BrowserMouseEventTrait
7 * @package Zumba\GastonJS\Browser
9 trait BrowserMouseEventTrait {
11 * Click on a given page and element
16 public function click($pageId, $elementId) {
17 return $this->command('click', $pageId, $elementId);
21 * Triggers a right click on a page an element
26 public function rightClick($pageId, $elementId) {
27 return $this->command('right_click', $pageId, $elementId);
31 * Triggers a double click in a given page and element
36 public function doubleClick($pageId, $elementId) {
37 return $this->command('double_click', $pageId, $elementId);
41 * Hovers over an element in a given page
46 public function hover($pageId, $elementId) {
47 return $this->command('hover', $pageId, $elementId);
51 * Click on given coordinates, THIS DOES NOT depend on the page, it just clicks on where we are right now
56 public function clickCoordinates($coordX, $coordY) {
57 return $this->command('click_coordinates', $coordX, $coordY);
61 * Scrolls the page by a given left and top coordinates
66 public function scrollTo($left, $top) {
67 return $this->command('scroll_to', $left, $top);