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

"Fail" Status for successful execution on Telerik Test Studio

4 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 13 Mar 2015, 10:11 PM
When this script step executes successfully on the website it shows up as fail in Test Studio

                     HtmlFindExpression expr = new HtmlFindExpression("class=~records_per");
                     HtmlSelect select1=Find.ByExpression<HtmlSelect>(expr);
                     select1.SelectByText("All", true);

                    ArtOfTest.WebAii.jQuery.jQueryControl jQueryControl = select1.AsjQueryControl();
                    jQueryControl.InvokejQueryEvent(ArtOfTest.WebAii.jQuery.jQueryControl.jQueryControlEvents.change);

The scripted step is used to select the "All" option from a dropdown list. When "All" is selected, the page will automatically refresh to show "All" the data on a page. Is there something missing? I look forward to your response.

4 Answers, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 1
answered on 13 Mar 2015, 10:48 PM
Nevermind, the fail was caused by the page reloading without any data present at that moment. It as appears as "Pass" when there is data on the page an the "All" option is selected.
0
Boyan Boev
Telerik team
answered on 18 Mar 2015, 12:38 PM
Hello Eric,

Glad to hear that you have resolved the issue.

If you need further assistance please let us know.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Eric
Top achievements
Rank 1
answered on 18 Mar 2015, 09:08 PM
Hi, I'm having issues using the SelectByPartialValue() function for the DOM in the picture below

using:

HtmlFindExpression expr = new HtmlFindExpression("class=~records_per"); //, "|", "Value=~214748647");
HtmlSelect select1=Find.ByExpression<HtmlSelect>(expr);
select1.SelectByPartialValue("214748", true);
 
ArtOfTest.WebAii.jQuery.jQueryControl jQueryControl = select1.AsjQueryControl();
jQueryControl.InvokejQueryEvent(ArtOfTest.WebAii.jQuery.jQueryControl.jQueryControlEvents.change);

With this DOM:
<td><select class="records_per_page" onchange="location.href = $(this).val();"><option value="https://website.com/Admin/POIs?Page=1&;PageSize=2147483647">All</option><option value="https://website.com/Admin/POIs?Page=1&;PageSize=10">10</option><option value="https://website.com/Admin/POIs?Page=1&;PageSize=20">20</option><option selected="selected" value="https://website.com/Admin/POIs?Page=1&;PageSize=50">50</option></select></td>

it can't find or select the 214748364, or 10 or even 20. Am I doing something wrong?
0
Boyan Boev
Telerik team
answered on 23 Mar 2015, 11:52 AM
Hello Eric,

I was able to reproduce this and have logged a bug here.

It seems that there is some problem with the "&;" in the value. Try deleting this from it and give that a try.

If the issue persists the only workaround is to use SelectByValue method and use the entire value.

Thank you for your understanding.

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
Eric
Top achievements
Rank 1
Answers by
Eric
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or