diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index a38885b4..e74fcb3a 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -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 = <<