Set current date as dynamic field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 03:59 AM
I'm trying to use ATF to test the Change process, and when closing off the implementation phase I would like to use the current date set programatically, rather than having to set this manually before running the test. I don't seem to see any options for setting dynamic date/time values when setting up test steps, does anyone know if this is possible?
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:14 AM
Hello - try below as a value
javascript: gs.nowDateTime();
OR
javascript: new GlideDateTime();
If this is Date field NOT Date/Time then try below
javascript: new GlideDateTime().getDate();
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:22 AM
Updated above response to add third option.
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:19 AM
The below thread is not a direct solution to your question but I am adding as a helpful material here, In addition to my above response.
Dynamic Date population in the Set Field Values in the Automated Test Framework (ATF)
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:54 AM