Skip to content

Commit

Permalink
Revert "Draging (which involves a click) also needs to scroll into view"
Browse files Browse the repository at this point in the history
This reverts commit 49b9098.
  • Loading branch information
alexpott committed Jul 31, 2024
1 parent 6f7cbb5 commit 761ea2e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1023,17 +1023,16 @@ public function dragTo(string $sourceXpath, string $destinationXpath)
$destination = $this->findElement($destinationXpath);

if ($this->isW3C()) {
$this->scrollElementIntoView($source);
$actions = array(
'actions' => [
[
'type' => 'pointer',
'id' => 'mouse1',
'parameters' => ['pointerType' => 'mouse'],
'actions' => [
['type' => 'pointerMove', 'duration' => 0, 'origin' => [Element::WEB_ELEMENT_ID => $source->getID()], 'x' => 0, 'y' => 0],
['type' => 'pointerMove', 'duration' => 0, 'origin' => [Element::WEB_ELEMENT_ID => $this->findElement($sourceXpath)->getID()], 'x' => 0, 'y' => 0],
['type' => 'pointerDown', "button" => 0],
['type' => 'pointerMove', 'duration' => 0, 'origin' => [Element::WEB_ELEMENT_ID => $destination->getID()], 'x' => 0, 'y' => 0],
['type' => 'pointerMove', 'duration' => 0, 'origin' => [Element::WEB_ELEMENT_ID => $this->findElement($destinationXpath)->getID()], 'x' => 0, 'y' => 0],
['type' => 'pointerUp', "button" => 0],
],
],
Expand Down

0 comments on commit 761ea2e

Please sign in to comment.