Page 1 of 1

Modal dialog after selecting contextmenu item

Posted: Wed Nov 18, 2009 11:49 am
by max
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

Re: Modal dialog after selecting contextmenu item

Posted: Wed Nov 18, 2009 2:11 pm
by max
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.

Re: Modal dialog after selecting contextmenu item

Posted: Wed Nov 18, 2009 3:04 pm
by Support Team
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