Handle Date Picker/Calender Conrtol

12 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!
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!