Ranorex

PushButton - how can I select an item from the dropdown list

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
sahoko



Joined: 09 Oct 2007
Posts: 9

PostPosted: Thu Oct 11, 2007 8:56 pm    Post subject: PushButton - how can I select an item from the dropdown list
I can open the dropdown list using this code fine:

foreach (Control control in _form.Controls)
{
Element objDropDown = control.Element.FindChild(role, name, className, location);
if (objDropDown != null)
{
// click the dropdown list
objDropDown.DoDefaultAction();
rc = 0;
break;
}
}

After the list is open, I don't know how to select an item. I don't know how to use the spy to get the info on the dropdown items since the dropdown list closes as soon as I activate the spy.
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 435

PostPosted: Thu Oct 11, 2007 10:45 pm    Post subject:
Quote:
I don't know how to use the spy to get the info on the dropdown items since the dropdown list closes as soon as I activate the spy.


If you enable the HotTracker, you can also check menus and popup menus with the Spy.

You can use the function PopupMenuSelectItem() or ContextMenu.SelectItemText() for selecting a menu item in a popup menu.

Jenö
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum