/**
  * Right click on something
  * @param $id
  */
 public function rightClick($id)
 {
     $action = new WebDriverActions($this->driver);
     $element = $this->find($id);
     $action->contextClick($element)->perform();
 }
Пример #2
1
 /**
  * Performs a simple mouse drag and drop operation.
  *
  * ``` php
  * <?php
  * $I->dragAndDrop('#drag', '#drop');
  * ?>
  * ```
  *
  * @param string $source (CSS ID or XPath)
  * @param string $target (CSS ID or XPath)
  */
 public function dragAndDrop($source, $target)
 {
     $snodes = $this->matchFirstOrFail($this->webDriver, $source);
     $tnodes = $this->matchFirstOrFail($this->webDriver, $target);
     $action = new \WebDriverActions($this->webDriver);
     $action->dragAndDrop($snodes, $tnodes)->perform();
 }
 public function __construct(WebDriver $driver)
 {
     parent::__construct($driver);
     $this->touchScreen = $driver->getTouch();
 }