This is a migrated thread and some comments may be shown as answers.

Need help with dynamic search page

2 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
K
Top achievements
Rank 1
K asked on 18 Apr 2016, 11:36 PM

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>=======================================

2 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 21 Apr 2016, 03:36 PM
Hi,

Thank you for contacting us.

Please allow me some more time to investigate this and prepare a code example for you.

I will update this thread accordingly.

Thank you!

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Boyan Boev
Telerik team
answered on 29 Apr 2016, 02:52 PM
Hi,

Please excuse me for the delayed replay.

It seems that this is a duplicate of your other ticket.

Let's please continue the discussion there.

Thank you!

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
K
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or