Modal dialog after selecting contextmenu item

Class library usage, coding and language questions.
max
Posts: 8
Joined: Mon Oct 12, 2009 3:43 pm

Modal dialog after selecting contextmenu item

Post by max » Wed Nov 18, 2009 11:49 am

My test selects an item from a contextmenu. After that a modal dialog opens in the AUT. Then Ranorex is hanging until I close the modal dialog manually. If I debug/pause at this point, the application stands at the select-method. It seems that the select tries something to do after it "selects" the item, but can not because of the modal dialog. Is there a way to go round this problem?

Thanks
Max

max
Posts: 8
Joined: Mon Oct 12, 2009 3:43 pm

Re: Modal dialog after selecting contextmenu item

Post by max » Wed Nov 18, 2009 2:11 pm

I replaced the select with click, what makes it working.
Usually I use select, because I had some problems with click on menuitems in the past.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Modal dialog after selecting contextmenu item

Post by Support Team » Wed Nov 18, 2009 3:04 pm

The implementation of the MenuItem.Select method depends on the element technology, i.e. on the type of control the element corresponds to. Ranorex will block until the "Select" operation is completed - obviously, that is after the modal dialog is closed.

It is usually "safer" and more similar to a human user to use Mouse and Keyboard alone. Using adapter methods like MenuItem.Select is always some kind of gray-box-testing, since those methods are technology specific and use functionality a human user won't use.

Regards,
Alex
Ranorex Support Team
.
Image