Handle Date Picker/Calender Conrtol

18 posts, 0 answers
  1. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 27 Apr 2011 Link to this post

    Hi
    How to handle the Data Picker/Calender Control using WebUI Dev Edition
    What should be the Coded Step for accessing the DD/MM/YYYY using Date Picker.

    Thanks
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 28 Apr 2011 Link to this post

    Hi Nitin,
        why do you need to automate this Control with code. Test Studio is designed to keep coding to a minimum. I'm curious as to why you need to use code only. Creating a test with Test Studio's recorder (no coding involved) will save you a lot of time and effort.

    Kind regards,
    Stoich
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 28 Apr 2011 Link to this post

    Hi
    Actually I am creating Testing Framework

    I want to do this by Coding only (No Record and PlayBack method).
    Like for Caleder Control I want to Do validation for Invalid Date types and only way is to Hanlde through Coded Step
  4. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 04 May 2011 Link to this post

    Hello Nitin,
        
    Could you elaborate what is the exact scenario you want to test? If you provide a live url with the page you need to automate and more details about what actions you need to execute or what values need to verify, we will be able to give you more specific directions on how to proceed.

    Kind regards,
    Pavel
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  5. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 06 May 2011 Link to this post

    Hello Pavel

    I want to Set the Date (Valid from and Valid To) acording to my requirements for Specific User, also I want Validations like "Start date cannot be after end date"
    When I Use Recording method, The Calender Control is Recognized as below:-

    // Click 'ContentplaceholderPaymentTermValidityValidFromOpenCalendarDialogButton'
            Pages.AUT.FrameApplicationframe.ContentplaceholderPaymentTermValidityValidFromOpenCalendarDialogButton.Click(false);
    // Click 'x10Link'
            Pages.AUT.FrameApplicationframe.x10Link.Click(false);
    // Click 'ContentplaceholderPaymentTermValidityValidToOpenCalendarDialogButton'
           Pages.AUT.FrameApplicationframe.ContentplaceholderPaymentTermValidityValidToOpenCalendarDialogButton.Click(false);
    // Click 'x27Link'
           Pages.AUT.FrameApplicationframe.x27Link.Click(false);

    I want to write the Coded Step to Enter Valid from date say ( 10 May 2009) and Valid To date say ( 10 May 2011), These Dates may vary for different User requirements

    Also this would help if i want to Modify date only, No need to Record again the Same Case for only Date Changes.

  6. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 06 May 2011 Link to this post

    Hi Nitin,

    Is the code you provided generated after you have recorded the clicks in test studio? Unfortunately I am still not able to advise you, as I do not have the page you are trying to test and thus I am not aware of the generated html you need to manipulate. Are you testing an instance of RadCalendar/RadDatePicker, or is it some other control?

    Regards,
    Pavel
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  7. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 09 May 2011 Link to this post

    Yes
    This Code appears after Recording in Test Studio

    Here is Code appears in Pages.g file when I add Calender Control Elements (Open Calender Control, Select Date, Select Month, Navigations keys for Changing months) one by one.

    here is the File as Attachment <<Pages.g.cs>>

    These are not a part of RadCalendar/RadDatePicker, these are part of .net calender control.
  8. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 09 May 2011 Link to this post

    Also, I am having one more question

    if I want to add @Today's date into Valid from field, How do I pick it from Windows Calender control.  
  9. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 09 May 2011 Link to this post

    Hi Nitin,

    I have prepared a simple test which is running against this page. Let me know if that helps.

    Kind regards,
    Pavel
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  10. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 12 May 2011 Link to this post

    Hi
    This Solution is for ASP.Net AJAX control, but in my Application Custom Calender Control is Used

    If i select the Next Month through Navigation Keys > then it is recognized as:-

    public ArtOfTest.WebAii.Controls.HtmlControls.HtmlImage WebResourceAxdDWy5yaGUgbh8XmnKNqiUU0rZpHde9eBAzi9MFUR1hdlcjmiGXcoxBgPS28b0NbGULXc3Lqx867dg5cPLC03LgDGJfl0XQooS8243FN0DXG3s6beaKyeggJL0xlboYEn6GDcXjGE28GiLszSYlxCvRUczcOm6Glj2dWYeVgRmKmcDf0AmpT634406742840000000Image
                    {
                        get
                        {
                            return Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlImage>("src=http://Machine5072:81/App/WebResource.axd?d=-wy5yaGUgbh8XmnKNqiUU0rZpHde9eB" +
                                    "Azi9MFUR1hdlcjmiGXcoxBgPS28b0NbGULXc3Lqx867dg5cPLC03Lg-dGJfl0XQooS8243FN0DXG3s6b" +
                                    "eaKyeggJL0xlboYEn6GDc-xjGE28GiLszSYlx-cvRUczcOm6Glj2dWYeVgRmKmcDf0&amp;t=6344067" +
                                    "42840000000", "tagname=img");
                        }
                    }

    When I select the Date, it is recognized as:-

                    /// Find logic
                    /// (Html): [tagname 'Exact' a] AND [TextContent 'Exact' 12]
                    ///
                    /// </summary>
                    public ArtOfTest.WebAii.Controls.HtmlControls.HtmlAnchor x12Link
                    {
                        get
                        {
                            return Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlAnchor>("TextContent=12", "tagname=a");
                        }
                    }
    How to Automate this or should I enter date manually in textboxes:(

  11. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 12 May 2011 Link to this post

    Hi, I am attaching Quick Video to show, what exactly is my Requirement.

    Hope this Helps.
  12. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 13 May 2011 Link to this post

    Hi Nitin,

    As explained previously, it is not possible to create a coded test without having the actual html output of the page in question. That is why I sent you a sample against a publicly available page, on which you can comment.

    Regards,
    Pavel
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  13. Habiba
    Habiba avatar
    9 posts
    Member since:
    Oct 2018

    Posted 31 Oct 2018 in reply to Stoich Link to this post

    how Can record a date form datevpicker in test studio?
  14. Elena
    Admin
    Elena avatar
    1222 posts

    Posted 06 Nov 2018 Link to this post

    Hello Habiba,

    Test Studio allows you to highlight any element on a page and add steps against it while in recording mode. Please try to add the necessary steps with the help of the elements menu - possibly you might need to locate the element in the DOM tree and then manually add the steps from step builder in the recording toolbar. Depending on the exact variation of the datepicker, you should be able to directly enter the desired date in the input filed. 

    In case the above information is insufficient and you need further assistance, please prepare a sample for the datepicker you need to automate along with the scenario to cover and what difficulties you are facing. That way I will be able to provide more exact advice based on the particular case. 

    Thanks in advance. 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  15. Shanmugaraju
    Shanmugaraju avatar
    1 posts
    Member since:
    Oct 2019

    Posted 19 Nov 2019 Link to this post

    Hi,

     

    How to handle Date picker in telerik test studio with recording mode,i need date 25/02/2018 (MM/DD/YYYY)

    I our application using date picker i am picked the date for the particular date from the date picker.

    Kindly do the needful.

  16. Elena
    Admin
    Elena avatar
    1222 posts

    Posted 21 Nov 2019 Link to this post

    Hi Shanmugaraju,

    The date picker control has its specifics and these need to be taken into account when automating such. 

    Using the calendar to select the desired date may be applicable in some scenarios if using data driven approach. This is because the displayed month is different depending on the current date. 

    However, when you need to enter an exact date by each test execution, it will be best to enter this manually as text in the input field of the calendar control.

    Please, give this a try and let me know if it works fine for the date picker you are automating. In case you face any troubles, please, let me know if you can share access to the application under test and demonstrate the control, or alternatively, you can prepare a test to show the issue against a demo page using the same control. 

    Thank you for your cooperation in advance.

    Regards,
    Elena
    Progress Telerik

     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  17. john
    john avatar
    1 posts
    Member since:
    Jul 2020

    Posted 31 Jul Link to this post

    THX,that's useful
  18. Elena
    Admin
    Elena avatar
    1222 posts

    Posted 31 Jul Link to this post

    Hi John,

    I am pleased to know you find these notes helpful! 

    Regards,
    Elena
    Progress Telerik

Back to Top