Last active
March 12, 2021 01:35
-
-
Save dannyshain/90428a0e297a5f3de1db97d483b3b3b8 to your computer and use it in GitHub Desktop.
SwipeGesture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Point source = slider.getLocation(); | |
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger"); | |
Sequence sequence = new Sequence(finger, 1); | |
sequence.addAction(finger.createPointerMove(ofMillis(0), | |
PointerInput.Origin.viewport(), source.x, source.y)); | |
sequence.addAction(finger.createPointerDown(PointerInput.MouseButton.MIDDLE.asArg())); | |
sequence.addAction(new Pause(finger, ofMillis(600))); | |
sequence.addAction(finger.createPointerMove(ofMillis(600), | |
PointerInput.Origin.viewport(), source.x + 400, source.y)); | |
sequence.addAction(finger.createPointerUp(PointerInput.MouseButton.MIDDLE.asArg())); | |
driver.perform(singletonList(sequence)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment