Automated Test Framework: Dynamic Date field populate via javascript: gs.daysAgo not working

michael_j_pears
Kilo Explorer

Hi I am having an issue in one of my instances where the Automated Test Framework: Dynamic Date field populate via javascript: gs.daysAgo is not working. 

Has anyone experienced this problem before?

 

Here is an example test similar to the one I am working on but scaled down to only show the problem I am facing. I am using a London instance for this example but it also occurs in Kingston Patch 8.

I am opening a record producer. 

Setting a date variable. 

find_real_file.png

find_real_file.png

 

Instead of inserting the calculated date value it is inserting the text of "javascript: gs.daysAgo(-3)" into the form when the test is run as illustrated in the example screen shot below. 

find_real_file.png

 

By contrast, a similar approach works correctly for console forms.

Take the following test that sets the valid to field on a knowledge article. 

find_real_file.png

find_real_file.png

It correctly sets the date for console based forms. 

find_real_file.png

7 REPLIES 7

Nitesh Balusu
Giga Guru
Can you post a screenshot of your test case? I’d like to look at it, I’m not sure if I encountered anything like this before.

Here is an example test similar to the one I am working on but scaled down to only show the problem I am facing. I am using a London instance for this example but it also occurs in Kingston Patch 8.

I am opening a record producer. 

Setting a date variable. 

find_real_file.png

find_real_file.png

 

Instead of inserting the calculated date value it is inserting the text of "javascript: gs.daysAgo(-3)" into the form when the test is run as illustrated in the example screen shot below. 

find_real_file.png

 

By contrast, a similar approach works correctly for console forms.

Take the following test that sets the valid to field on a knowledge article. 

find_real_file.png

find_real_file.png

It correctly sets the date for console based forms. 

find_real_file.png

 

 

 

I found out about this, its a known problem! I wouldn't call it a problem, it's just built that way. We had opened an RFE!

Hi - did you create any type of workaround for this?

I'd like to do something similar where we set a variable on a Record Producer to be 10 days in the future.

Doesn't seem to work by entering javascript in the variable section.

 

Thanks!