Mouse Right Click
There is no way to simulate a right button click and for some windows application it was very useful.
Hi @FBorges14,
Mouse right click or context click action is definitely useful and we have a proper example on how to do it on https://github.com/Microsoft/WinAppDriver/blob/v1.0/Tests/WebDriverAPI/Mouse.cs#L72. E.g.
session.Mouse.ContextClick(appNameTitle.Coordinates);
If anybody wants to know how to do it in Ruby:
element = $Session.find_elements(:name, "Item name")[0]
$Session.action.context_click(element).perform()
Closing ticket as issue seems to be resolved.
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);
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);
Try moving the mouse where you want to click based on offsets:
session.Mouse.MouseMove(session.FindElementByName("ElementName").Coordinates, 145, 391); session.Mouse.ContextClick(null);
This will Context Click with an offset of 145, 391 from the element named "ElementName".
yep, offsets are the best, thanks :-)
пт, 27 сент. 2019 г. в 20:23, James Palmer [email protected]:
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);
Try moving the mouse where you want to click based on offsets:
session.Mouse.MouseMove(session.FindElementByName("ElementName").Coordinates, 145, 391); session.Mouse.ContextClick(null);
This will Context Click with an offset of 145, 391 from the element named "ElementName".
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/WinAppDriver/issues/343?email_source=notifications&email_token=AKER6JA4AIHUVH65SJQBANLQLY6SBA5CNFSM4EMSGQE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ZSEMA#issuecomment-536027696, or mute the thread https://github.com/notifications/unsubscribe-auth/AKER6JHQVGBR3W2RA2UD6ADQLY6SBANCNFSM4EMSGQEQ .