cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
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
[Community Expert Group]
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
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
[Community Expert Group]
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
[Community Expert Group]
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