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)
Menustrip and Contextmenu options
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Menustrip and Contextmenu options
Hi,
Example RxPath:
Peter
Ranorex Team
gurpreet singh wrote:1) How to check whether context menu and menustrip option are enabled or disabled.
e.g Edit > Copy (in menu strip)
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.gurpreet singh wrote: 2) How to check whether contex menu option is checked or unchecked(checkbox provided beside context menu option)
Example RxPath:
menuitem[@name='Navigate Forward' and @enabled='False' and @checked='False']Regards,
Peter
Ranorex Team
-
- Posts: 5
- Joined: Wed Feb 06, 2013 9:02 am
Re: Menustrip and Contextmenu options
thx Peter anyways .. but i forgot to mention that i'm using RanorexPython.
Do you have solution in RanorexPython.
Do you have solution in RanorexPython.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Menustrip and Contextmenu options
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).gurpreet singh wrote:but i forgot to mention that i'm using RanorexPython.
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