WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Mouse Right Click #343 Question

Open Soloveykos opened this issue 7 years ago • 7 comments

Hi, I'd like to do ContextClick on my own coordinates since control is not possible to define by UIInspect. how could I define coordinates on my own? I need something like: session.Mouse.ContextClick(MyOwnCoordinatesDependingOnControlCoordinates);

Soloveykos avatar Jul 30 '19 08:07 Soloveykos

you mean you need to hard code the coordinates

anunay1 avatar Jul 30 '19 15:07 anunay1

yes, but how to hardcode them using ICoordinates?

Soloveykos avatar Jul 31 '19 08:07 Soloveykos

I have @Soloveykos, I would recommend taking a look at our Mouse Input examples.

hassanuz avatar Aug 07 '19 02:08 hassanuz

Unfortunately I can find only MouseMove, Mouse.DoubleClick and others with Control.Coordinates. The problem is that I don't have strict coordinates, I have only one control, but I need to click outside this control, because The real control is not possible to define, Here is the example image

Soloveykos avatar Aug 07 '19 18:08 Soloveykos

This should be possible like this: Move the Mouse to a defined Control and add an Offset, Then RightClick

session.Mouse.MouseMove(Control1.Coordinates, int offsetX, int offsetY);
session.Mouse.ContextClick(null);

But it is not working so easy. The Offset does not move the Cursor to the expected location. For me its still confusing how the offset works...

schrdori avatar Sep 09 '19 14:09 schrdori

I've found the solution, I could get any control points by this method .GetAttribute("ClickablePoint"). So after that I could click anywhere where I need :-).

Soloveykos avatar Sep 12 '19 11:09 Soloveykos

and new Actions also gives possibilities to achieve clicking on any calculated coordinates based on offset. Thank you a lot guys. Great work!

пн, 9 сент. 2019 г. в 17:02, schrdori [email protected]:

This should be possible like this: Move the Mouse to a defined Control and add an Offset, Then RightClick

session.Mouse.MouseMove(Control1.Coordinates, int offsetX, int offsetY); session.Mouse.ContextClick(null);

But it is not working so easy. The Offset does not move the Cursor to the expected location. For me its still confusing how the offset works...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/WinAppDriver/issues/780?email_source=notifications&email_token=AKER6JG2Y7KI5MW6SKG6KILQIZJQFA5CNFSM4IH2AJA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6HV6UY#issuecomment-529489747, or mute the thread https://github.com/notifications/unsubscribe-auth/AKER6JGIL2V7N4AM7OTJPNTQIZJQFANCNFSM4IH2AJAQ .

Soloveykos avatar Aug 30 '20 14:08 Soloveykos