public function testGetAuxiliary()
 {
     $in_view_port = function () {
     };
     $on_page = function () {
     };
     $webDriverCoordinates = new WebDriverCoordinates(null, $in_view_port, $on_page, 'auxiliary');
     self::assertEquals('auxiliary', $webDriverCoordinates->getAuxiliary());
 }
Exemplo n.º 2
0
 /**
  * @param WebDriverCoordinates $where
  * @param int|null $x_offset
  * @param int|null $y_offset
  *
  * @return RemoteMouse
  */
 public function mouseMove(WebDriverCoordinates $where = null, $x_offset = null, $y_offset = null)
 {
     $params = array();
     if ($where !== null) {
         $params['element'] = $where->getAuxiliary();
     }
     if ($x_offset !== null) {
         $params['xoffset'] = $x_offset;
     }
     if ($y_offset !== null) {
         $params['yoffset'] = $y_offset;
     }
     $this->executor->execute(DriverCommand::MOVE_TO, $params);
     return $this;
 }