コード例 #1
0
ファイル: WebDriver.php プロジェクト: neronmoon/Codeception
 /**
  * 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();
 }