Hello,
I am using Test Studio for the first time this week. I was hoping to get some help with testing a search page (link below). When I go to the search page and type in 'ch' I get several dynamic items to choose from. Is there a web page that shows me the method or properites I need? Any help would be appriciated. My question are.....
1. How can I get a count on the number of dynamic items that appear as I type in my two letters?
2. How can I get a list of the items and send it to the log file?
3. If I find the item I'm looking for, how can I select it and mark it as "Pass" ?
Link to search page --> http://demos.telerik.com/aspnet-ajax/searchbox/examples/search-context/defaultcs.aspx
I assumed I needed code to get what I needed (if not please let me know). Below is what little code I have so far. My questions are...
=================<code so far>=======================================
[CodedStep(@"RadSearchBoxDropDown('aspnetForm'): selecting item '3'")]
public void WebTest_CodedStep()
{
HtmlControl items = Pages.SearchContextFunctionality.Div;
Log.WriteLine("Count =====> " + items.ChildNodes.Count.ToString());
int counter = 0;
foreach (Element e in items.ChildNodes)
{
counter = counter + 1;
Log.WriteLine("----> Item " + counter.ToString());
Log.WriteLine(Pages.SearchContextFunctionality.Div.TextContent);
}
// RadSearchBoxDropDown('aspnetForm'): selecting item '0'
Pages.SearchContextFunctionality.Div.SelectItem(3);
}
=================<end code>=======================================