Created
November 30, 2021 15:31
-
-
Save jimevans/7e43f8681b097df5445f1235b40b287e to your computer and use it in GitHub Desktop.
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
// Assume driver and element are properly defined and assigned elsewhere. | |
PointerInputDevice mouse = new PointerInputDevice(); | |
ActionBuilder builder = new ActionBuilder(); | |
builder.AddActions( | |
mouse.CreatePointerMove(element, 0, 0, TimeSpan.FromMilliseconds(100), | |
mouse.CreatePointerDown(MouseButton.Left), | |
mouse.CreatePointerMove(element, 100, 100, TimeSpan.FromMilliseconds(100), | |
mouse.CreatePointerUp(MouseButton.Left) | |
); | |
((IActionExecutor)driver).PerformActions(builder.ToActionSequence()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment