How do I verify if my RadComboBox contains a specific text?
I used the coded step as below:
string textToFind = "ATAX";
bool found = false;
foreach(Telerik.WebAii.Controls.Xaml.RadComboBoxItem item in Pages.Tiger.SilverlightApp.TaxCodeComboBoxRadcombobox.Items)
{
if (item.Content.ToString().Equals(textToFind))
{
found = true;
break;
}
}
Assert.IsTrue(found);
But when execution, I got the following error:
Exception thrown executing coded step: '[test] : test'.InnerException:ArtOfTest.Common.Exceptions.AssertException: Assert.IsTrue - [Expected:True],[Actual:False] at ArtOfTest.Common.UnitTesting.Assert.IsTrue(Boolean condition, String message) at ArtOfTest.Common.UnitTesting.Assert.IsTrue(Boolean condition)
Am I missing something? It doesn't seem to correctly identify the items of the combo box.
I edited TaxComboBoxRadComboBox in such a way automationid = TaxCodeComboBox, but I am still getting the same error
I can show to you how I create the script through SharedView
Regards,
Jan Mark