Hi
I am attempting to use the testing framework to write an UI test that is using the RadCombobox, However I am having trouble and looking for pointers in where I am going wrong. This may be the first of many posts ;-)
For this post, I am using this page for testing purposes: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
I have test class set up, and what I am attempting to do is search for a company, and then select the company from the list, however, I cannot get the number of items in the combobox after doing the filter.
This is an asp.net combobox, not silverlight. I am using the latest version of nunit, telerik asp.net and testing framework. I have viewed the samples for the test framework, but all the samples that I saw are testing this page: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/keyboardsupport/defaultcs.aspx and dont appear relevant for what I want to do.
This is the test to indicate by problem: I have excluded setup and teardown for brevity.
I cannot get past the assert to ensure that 4 items have been returned, as the value returned is always 0.
I know I have missed something simple. Thanks in advance
Darren
I am attempting to use the testing framework to write an UI test that is using the RadCombobox, However I am having trouble and looking for pointers in where I am going wrong. This may be the first of many posts ;-)
For this post, I am using this page for testing purposes: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
I have test class set up, and what I am attempting to do is search for a company, and then select the company from the list, however, I cannot get the number of items in the combobox after doing the filter.
This is an asp.net combobox, not silverlight. I am using the latest version of nunit, telerik asp.net and testing framework. I have viewed the samples for the test framework, but all the samples that I saw are testing this page: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/keyboardsupport/defaultcs.aspx and dont appear relevant for what I want to do.
This is the test to indicate by problem: I have excluded setup and teardown for brevity.
[Test]
public void SearchForCompany()
{
string companyToSearchFor = "H";
RadComboBox comboBox = browser.Find.ById<
RadComboBox
>("RadComboBox1");
comboBox.Click();
comboBox.Text = companyToSearchFor;
comboBox.ShowDropDown();
browser.WaitUntilReady();
browser.RefreshDomTree();
var comboboxItems = comboBox.Items;
Assert.That(comboboxItems.Count, Is.EqualTo(4));
comboBox.SelectItemByIndex(1);
}
I cannot get past the assert to ensure that 4 items have been returned, as the value returned is always 0.
I know I have missed something simple. Thanks in advance
Darren