Building test case with Test Studio

2 posts, 0 answers
  1. CIPC
    CIPC avatar
    1 posts
    Member since:
    Nov 2017

    Posted 13 Nov 2017 Link to this post

    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.

     

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    939 posts

    Posted 14 Nov 2017 Link to this post

    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!
Back to Top