Page 1 of 1

Menustrip and Contextmenu options

Posted: Fri Feb 08, 2013 7:08 am
by gurpreet singh
1) How to check whether context menu and menustrip option are enabled or disabled.
e.g Edit > Copy (in menu strip)
2) How to check whether contex menu option is checked or unchecked(checkbox provided beside context menu option)

Re: Menustrip and Contextmenu options

Posted: Fri Feb 08, 2013 1:12 pm
by Support Team
Hi,
gurpreet singh wrote:1) How to check whether context menu and menustrip option are enabled or disabled.
e.g Edit > Copy (in menu strip)
gurpreet singh wrote: 2) How to check whether contex menu option is checked or unchecked(checkbox provided beside context menu option)
You can use the @enabled attribute to do this job. With this attribute you can check if the menu is enabled or disabled. And to check the checked state of your menu item you could use the @checked attribute of the menuitem.

Example RxPath:
menuitem[@name='Navigate Forward' and @enabled='False' and @checked='False']
Regards,
Peter
Ranorex Team

Re: Menustrip and Contextmenu options

Posted: Fri Feb 08, 2013 1:52 pm
by gurpreet singh
thx Peter anyways .. but i forgot to mention that i'm using RanorexPython.
Do you have solution in RanorexPython.

Re: Menustrip and Contextmenu options

Posted: Tue Feb 12, 2013 11:01 am
by Support Team
gurpreet singh wrote:but i forgot to mention that i'm using RanorexPython.
You are using Ranorex 1.5? Well, the solution should be similar, you need to search for an element with that state (enabled = false; checked = false).

However, Ranorex 1.X does not support RanoreXPath, so you need to search for that element using code. If you just started using Ranorex, I encourage you to update to the latest Ranorex release (we are currently at 4.0).

Regards,
Alex
Ranorex Team