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 authored and aik099 committed Nov 2, 2024
1 parent ad0072e commit 696ed94
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 @@ -981,9 +981,11 @@ public function dragTo(string $sourceXpath, string $destinationXpath)
$this->executeJsOnElement($source, $script);

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

$script = <<<JS
Expand Down

0 comments on commit 696ed94

Please sign in to comment.