How to right click on a web element in Ranorex 8.3.1

Ask general questions here.
chiranthurs
Posts: 19
Joined: Mon Oct 29, 2018 1:09 pm

How to right click on a web element in Ranorex 8.3.1

Post by chiranthurs » Thu Dec 20, 2018 10:36 am

Hi Team,

I used the below line of code to right click on a web element on Ranorex 5.3.2 and on migrating my scripts to Ranorex 8.3.1, I am getting an error. Please help.

Ranorex 5.3.2 code to right click on element:
Mouse.Click(repo.AccountsGLAccounting.Object.MainPage.RemindersTab.DocNo, MouseButtons.Right);

Error: The Name 'MouseButtons' does not exist in the current context (CS0103)

Regards,
Chiranth

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4802
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to right click on a web element in Ranorex 8.3.1

Post by odklizec » Thu Dec 20, 2018 12:13 pm

Hi,

You can use this:
WinForms.MouseButtons.Right
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

chiranthurs
Posts: 19
Joined: Mon Oct 29, 2018 1:09 pm

Re: How to right click on a web element in Ranorex 8.3.1

Post by chiranthurs » Thu Dec 20, 2018 12:32 pm

Worked!! :)

Mouse.Click(repo.AccountsGLAccounting.Object.MainPage.RemindersTab.DocNo, Winforms.MouseButtons.Right);

Thanks,
Odklizec