示例#1
0
 /**
  * Set the position of the current window. This is relative to the upper left
  * corner of the screen.
  *
  * @param int $width The target window width.
  * @param int $height The target height height.
  * @return WebDriverWindow The instance.
  */
 public function setPosition(WebDriverPoint $position)
 {
     $params = array('x' => $position->getX(), 'y' => $position->getY(), ':windowHandle' => 'current');
     $this->executor->execute(DriverCommand::SET_WINDOW_POSITION, $params);
     return $this;
 }
 /**
  * Check whether the given point is the same as the instance.
  *
  * @param WebDriverPoint $point The point to be compared with.
  * @return bool Whether the x and y coordinates are the same as the instance.
  */
 public function equals(WebDriverPoint $point)
 {
     return $this->x === $point->getX() && $this->y === $point->getY();
 }
 /**
  * Set the position of the current window. This is relative to the upper left
  * corner of the screen.
  *
  * @param int $width The target window width.
  * @param int $height The target height height.
  * @return WebDriverWindow The instance.
  */
 public function setPosition(WebDriverPoint $position)
 {
     $params = array('x' => $position->getX(), 'y' => $position->getY(), ':windowHandle' => 'current');
     $this->executor->execute('setWindowPosition', $params);
     return $this;
 }