diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index 6d88301a..5c931950 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -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 = <<