Skip to content

Commit d4c4d1e

Browse files
committed
MQE-2140: [chrome81] dragAndDrop with x and y offsets no longer works
1 parent e0ca5fd commit d4c4d1e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,14 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null)
754754

755755
$travelX = intval($targetX - $snodes->getLocation()->getX());
756756
$travelY = intval($targetY - $snodes->getLocation()->getY());
757+
$action->moveToElement($snodes);
758+
$action->clickAndHold($snodes);
759+
$action->moveByOffset($travelX, $travelY);
760+
$action->release()->perform();
757761

758-
$action->dragAndDropBy($snodes, $travelX, $travelY)->perform();
759762
} else {
760-
$action->clickAndHold($snodes)->perform();
761-
$action->moveToElement($tnodes)->perform();
763+
$action->clickAndHold($snodes);
764+
$action->moveToElement($tnodes);
762765
$action->release($tnodes)->perform();
763766
}
764767
}

0 commit comments

Comments
 (0)