Forum Discussion

Alaguraja's avatar
Alaguraja
Occasional Contributor
8 years ago

Unable to select date from Calendar

Hi All,

 

I trying to automate one web page. After launching the URL I have to select start date and End date as Previous business date. But I am not able to select the date from the calendar. If anybody have resolution of this issue, Please let me know.

 

 

Note: We couldn’t enter the date in the input text box manually also. So the only option is we have to click the Calendar button and then choose the date.

 

 

Regards,

Alaguraja V

5 Replies

  • Need more info than this.

     

    The date picker object in your Object Spy screen capture shows as having 5 child object.

     

    My guess is they will be the components that make up your date picker. Can you confirm this?

  • Alaguraja's avatar
    Alaguraja
    Occasional Contributor

    Hi Colin,

     

    Thanks..The Child object only shows the Month/Year back and forward button.

     

    I just tried the below and its working fine.

     

    Aliases.Obj_Browser.Obj_pageurl.Obj_iFlowFxTrader.Obj_iFlowFxTrader2.Obj_DateFieldStart.Obj_DateTxtStart.FlexObject.text="07/15/2016"

     

     

    Regards,

    Alaguraja V

     

     

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      And "CalendarLayout" which will be the part that shows the current month.

       

      I imagine that's the part you'll need to interact with. Although quite possibly the buttons for month/year as well.

       

      Certainly, I've automated date pickers (not this exact one right enough) before and they were much the same as this. I use the buttons to move month/year and select the date on the calendar part.

       

      What are the available properties on CalendarLayout?

       

      Setting it directly using a method of the control is all well and good as a workaround. But I wouldn't want it in a proper test as it's not something the user is able to do ...

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        Also, have you tried recording this? See what it gives you? Hopefully something more than a co-ordinate on the container!

  • aparrap's avatar
    aparrap
    Regular Visitor

    Hi,

     

    Have you tried using the

    Aliases.Obj_Browser.Obj_pageurl.Obj_iFlowFxTrader.datechooser0.wDate = "08/08/2016"

     

    or Also if the object has the AcceptPopUpValue("08/08/2016") method .... you can use that and it works fine.