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

Building test case with Test Studio

1 Answer 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
CIPC
Top achievements
Rank 1
CIPC asked on 13 Nov 2017, 09:30 AM

Good Morning,

I am building an automated test case using Test Studio, I need to evaluate and recommend a test tool for our company.

I can record a test case and play it back until I get to the point where I have to select a date from this date picker:

The code on the page for the date picker:

<input type="image" name="ctl00$cntMain$imgCal" id="ctl00_cntMain_imgCal" src="images/calendar.png" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$cntMain$imgCal&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="border-width:0px;">

The play back stops here.

Please assist.

Thank you.

 

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 14 Nov 2017, 02:46 PM
Hi,

Thank you for the details. 

As far as I could see there is an Javascript event bound to that control. To trigger it during execution you probably would need to enable the 'SimulateRealClick' for the click step (please see the screenshot). Once the calendar is displayed most probably you would need to choose certain date. Since I am not familiar with the application under test I will provide some general recommendations which you might need to adjust as per the page specifics. 

Once the calendar is displayed you could turn on the highlighting and explore the element in the DOM tree . You might need to select in the DOM and add a step manually from the Step Builder

To be able to understand whether the correct element is being targeted during execution you could enable the annotations (please refer to point 5. in this article). This will highlight the target element for each step for better visualizing if the test runs as expected. If it is not you might need to change the element's find expression to point to the correct one. It is recommended to use unique attributes of the element or a set of such. 

Please let me know if these directions are sufficient. In case you would need further assistance please keep in mind I might need a sample application with the same control implemented so that I could test on my end. 

Thank you for your cooperation in advance! 

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