How to pass today's date in "Set Component Values (Custom UI)" step?

Karthi17
Tera Contributor

 We have a calendar field through which we have to pass tomorrow's date. This calendar field can only be accessed using Custom UI. So, we chose the step "Set Component Values (Custom UI)" to pass the date into the calendar field. The code that we used was

javascript:gs.daysAgo(-1);

 

Image of ATF Test Script:

Screenshot 2023-09-26 at 11.46.56 AM.png

 

But, when executing, we noticed that, instead of the date, the whole text of the function "javascript:gs.daysAgo(-1);" is being displayed in the calendar field. Is there any other way to pass tomorrow's date or current date into the field?

 

Image when executing:

Screenshot 2023-09-26 at 11.48.14 AM.png

 

Note: This javascript function is working fine when we used for normal "Set Field Values" step, but not working for "Set Component Values (Custom UI)" step

 

#atf

#automatedtestframework

@Siddhartha6 

1 REPLY 1

Community Alums
Not applicable

I am facing the same issue is there any solution for that?