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 Oct 17, 2022
1 parent 6dfa509 commit afbf746
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 @@ -930,9 +930,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 afbf746

Please sign in to comment.