In RCPTT, how do you verify the state of a SWT.CHECK menu item?

142 views Asked by At

I have an Eclipse based application that has a context menu with items that when clicked on once cause the menu to disappear. If the menu is opened again those items are checked (their style is SWT.CHECK). If clicked on again they are unchecked. In RCPTT there's no way to enter Assertion Mode without the context menu disappearing so I need to write the ECL code manually. So what I'm doing is I click on the item and it generates the following ECL code:

get-menu -path "someCascadeMenuItem/someSelectableLeafItem" | click

Instead of that "click" I need to verify the state of the menu-item. My question is how do I verify if that leaf item is checked or unchecked? I wasn't able to find any command for this.

1

There are 1 answers

0
Tamara H. On

try this:

get-menu -path "ABC/DEF" | get-property enablement | equals true | verify-true

So far I found following properties: caption, selection, enablement, index and cascade

I reached this by activating assertion mode, then opening the context menu and eventually clicking on what I wanted to check. Yet, I don't know if this works reliably.