WinAppDriver
WinAppDriver copied to clipboard
How to reset the mouse position to the left most corner before doing action using movebyoffset?
I am trying to click on a glyph icon by using its screen co-ordinates. For that, I am using MoveByOffset() method. Since mine is an automation element, i cant use MoveToElement() since it expects an IWebElement to be passed.
I know that MoveByOffset moves the mouse to the specified offset of the last known mouse coordinates. So I need to first reset the mouse position by moving to the left most corner.
Any help is appreciated.
You can use the following properties of the element in question to move mouse :
winElement.Location.X
winElement.Location.Y
The width and height of the element can be found using following properties:
winElement.Size.Height
winElement.Size.Width
Have you managed to do it?