cancel
Showing results for 
Search instead for 
Did you mean: 

How to add today's date to a step in test complete -

SOLVED
Highlighted
Frequent Contributor

How to add today's date to a step in test complete -

When I click on that Field a calendar is displayed and I can see that todays date is highlighted.

Attaching Screenshots of teh step and the UI.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to add today's date to a step in test complete -

That script is simply an example of how to get today's date.  It demonstrates logging to the test log the date as is.

If you need to use the date for some other purpose, you would use the aqDateTime.Today() method in that vein.

However... without more specifics of EXACTLY what you're trying to do, all I can do is give the general reference.

 

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/today.html


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: How to add today's date to a step in test complete -

Easy sample code to demonstrate

 

Log.Message(aqDateTime.Today())


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Frequent Contributor

Re: How to add today's date to a step in test complete -

So write this as a script  and call it in that step? run the script at that step?

Log.Message(aqDateTime.Today())

Highlighted
Community Hero

Re: How to add today's date to a step in test complete -

That script is simply an example of how to get today's date.  It demonstrates logging to the test log the date as is.

If you need to use the date for some other purpose, you would use the aqDateTime.Today() method in that vein.

However... without more specifics of EXACTLY what you're trying to do, all I can do is give the general reference.

 

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/today.html


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors