How to give dynamic date in Set field value step in ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2024 10:46 PM - edited ‎05-30-2024 10:46 PM
Hello experts,
Need your help in ATF test step.
in the "set field value" step for planned start date and planned end date i want to give dynamic date instead of a static date to run the ATF' tests seamlessly without modifiying them for every time i run the script.
I want the current date +3 minutes 10 seconds,
example current date & time : 31/05/2024 22:05:20
my expoected date & time : 31/05/2024 22:08:30
which is 3 minutes 10 seconds greature than the current time.
i want to do the same for planned end date as well.
is there a way i can do it?
your assistance is highly appreciated
Thanks & Regards,
Gupta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2024 10:51 PM - edited ‎05-30-2024 11:00 PM
Hello @SLK Gupta ,
Please write instead date in that field like below
javascript : new GlideDateTime().addMinutes(3); // this will return current date and time and adds three minuites to it
or you can write script include and call that script here instead of this.
Try writing code in script include to update date after 3 min 10 sec.
Thanks ,
Valmik Patil