Skip to content

Commit

Permalink
No WebDriver\Session::moveto() call when dragging over itself
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 3, 2023
1 parent fac3c28 commit afa138b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,11 @@ public function dragTo($sourceXpath, $destinationXpath)
$this->executeJsOnElement($source, $script);

$this->wdSession->buttondown();
$this->wdSession->moveto(array(
'element' => $destination->getID()
));
if ($destination->getID() !== $source->getID()) {
$this->wdSession->moveto(array(
'element' => $destination->getID()
));
}
$this->wdSession->buttonup();

$script = <<<JS
Expand Down

0 comments on commit afa138b

Please sign in to comment.