Hiya
I have a control of type:
DevExpress.XtraEditors.ComboBoxEdit
But Ranorex Spy see's this as two controls:
- Text
- Button
Why can't it map it to Ranorex.ComboBox ?
Thanks
Dev Express ComboBox
Re: Dev Express ComboBox
It means I have to write my own wrapper to Invoke Remotely to do the most basic things like:
- Get list of items in combo box
- Select an item
Thanks
- Get list of items in combo box
- Select an item
Thanks
Re: Dev Express ComboBox
We also use the same DevExpress combos in our AUT, but you do not need to use InvokeRemotely to access the information within them. But it does take just a little bit of work.
What I do in my ComboSelect method is (with error checking and logging removed for brevity):
1) Find the Combo then it's associated Open button
2) Open the Combo by clicking the Open button
3) Find the ListItem I want to click & scroll to it if it is not visible
You can use similar code to Open the combo then get the entire list to an array if you want to do that instead of clicking a list item. No Invoke required...
What I do in my ComboSelect method is (with error checking and logging removed for brevity):
1) Find the Combo then it's associated Open button
Code: Select all
HDComboBox = RanorexFormName.FindSingle(".//combobox[@controlname='" + ComboBoxName + "' or @text='" + ComboBoxName + "' or @controlid='" + ComboBoxName + "']", 60000);
HDComboOpenButton = HDComboBox.FindSingle("button[@accessiblename='Open']", 30000);
Code: Select all
HDComboOpenButton.Click();
Code: Select all
HDComboBoxListItem = HDComboBox.FindSingle<ListItem>("list/listitem[@accessiblename='" + ComboBoxItem + "' or @text='" + ComboBoxItem + "']");
if (HDComboBoxListItem.Visible == false)
{
HDComboListScrollBar = HDComboBox.FindSingle(".//scrollbar[@accessiblename='Vertical']", 60000);
if (HDComboListScrollBar.Value != 0)
{
HDComboListPageUp = HDComboBox.FindSingle(".//scrollbar/button[@accessiblename='Page up']", 60000);
}
while (HDComboListScrollBar.Value != 0)
{
HDComboListPageUp.Click();
}
HDComboListPageDown = HDComboBox.FindSingle(".//scrollbar/button[@accessiblename='Page down']", 60000);
while (HDComboBoxListItem.Visible == false)
{
HDComboListPageDown.Click();
}
}
HDComboBoxListItem.Click();
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Dev Express ComboBox
Hiya
The problem for me is my company have inherited from Dev Express controls to create new ones
But they have the same properties as Dev Express ones
Argh!
The problem for me is my company have inherited from Dev Express controls to create new ones
But they have the same properties as Dev Express ones
Argh!