Forum Discussion

Ravik's avatar
Ravik
Super Contributor
12 years ago

Working with Date control in TestComplete 8.7

Hi All,



We are using TestComplete 8.7 for a Web base application, In our application, we use Ajax Date control. Please Confirm

1- TestComplete 8.7, is Support Ajax Date Control ? (Ajax tool kit)

2- How can we put the past/Future date

(same like - FlexObject.selectedDate = aqDateTime.Today-365)



Here AqDateTime.Today - 365 select 1 yrs back date.



Please help us.



Thanks


6 Replies

  • vincent_goude's avatar
    vincent_goude
    Occasional Contributor
    Can you give us an adress to a website using this Ajax Date Control?



    While using aqDateTime you must use Get and Add functions like addDay, GetYear,...

    Here are some example of functions using aqDateTime Library.

    First day of the month:

    aqDateTime.AddDays(aqDateTime.Today(),1-aqDateTime.GetDay(aqDateTime.Today()))





    Last day of the month:

    aqDateTime.AddDays(aqDateTime.AddMonths(aqDateTime.Today(),1)

    ,-aqDateTime.GetDay(aqDateTime.Today()))
  • gid_216's avatar
    gid_216
    Frequent Contributor
    Hi,



    for 8.7 supports check TC 8.7 Support.



    To put 1 yr back date, don't use 365. better check for leap year and based on that use 365 or 366
  • Ravik's avatar
    Ravik
    Super Contributor
    Deepak, How we can select Date in web application, If in Web application, used Ajax took kit (Ajax Datecontrol/Date Picker). Is there any method, please help !
  • Ravik's avatar
    Ravik
    Super Contributor
    Hi Vincent,



    I am attaching the snap of Date Control, Which is use in our web application



    (I am not sure on which social web side use such control)



    I want to be select any, Past date randomly.
  • Ravik's avatar
    Ravik
    Super Contributor
    Hi Tanya,



    Ok, I will use Record and Payback methodology, and definetly I will be work.

    but what happen when month is change, Year is Change.



    actually, it's gives Waiting for Object(...) Error and Stop TestCompele. When Month or Year Change. So we need to change our script every month/Year.



    (currently I am using same approch but Every month I need to update my script.  it's not corret  approch)