0

1)I have a telerik RadRibbonComboBox control as part of Ribbon Header and a regular RadComboBox control in body in my application. each combobox is populated with few items.

2)When an item in regular RadComboBox control is selected as part of recording for codedui automation using test builder, item has been added properly under its parent control UIRadComboBoxComboBox as UIRadComboBoxItem with controltype as ListItem and className as Uia.RadComboBoxItem .And i am able to read this RadComboBoxItem properly with out any issues.

3)But when an item in RadRibbonCombobox control is selected, and item has been added as a ListBoxItem (instead of comboboxitem) under indirect parent control which is not its immediate parent as UIXXXListBoxItem with controlType as ListItem and ClassName as Uia.ListBoxItem (item not added under its immediate parent UIRadRibbonComboBoxComboBox control as comboboxitem). while running the test,playback failed to find this item control.I tried to fix this error by setting the parent UIRadRibbonComboBoxComboBox as container for UIXXXListBoxItem in UIMap file but same problem came again.

4)Also i tried following way to select required combobox item from UIMAp file directly with out recording that particular action,

this.UIAssignedProposalsPreWindow.UIRadRibbonViewTabList.UISearchRibbonViewContCustom.UIRadRibbonComboBoxComboBox.SelectedItem="Test1"
this.UIAssignedProposalsPreWindow.UIRadRibbonViewTabList.UISearchRibbonViewContCustom.UIRadRibbonComboBoxComboBox.SelectedIndex=1;
this.UIAssignedProposalsPreWindow.UIRadRibbonViewTabList.UISearchRibbonViewContCustom.UIRadRibbonComboBoxComboBox.SetPreoperty("SelectedIndex",1);

But above changes failed with error

"Element not found.inner exception :Operation is not valid due to the current state of the object."

Please help me in fixing this issue as this issue has blocked my work.

1 Answer 1

0

Issue was my Debugging.Actually i have added one breakpoint between combobox dropdown click action and combobox item selection action.When i am trying to debub my test after clicking combobox dropdown unknowingly i have introduced some delay between these two actions.So the item selection action failed since it could not find the expanded combobox on the screen.When i ran the test directly test passed properly..

-My bad..

Thanks, Raghu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.