Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

ATF Error

JohnnySnow
Mega Sage

Hi Team,

 

We have multiple ATFs failing with below message, any idea what the issue is? And it seems to work some time and fails other times, even though the steps remain the same.

 

Click a UI Action

This step failed because the client error 'Uncaught ReferenceError: g_form is not defined' was detected on the page being tested. See failing Test Logs. To ignore these errors in the next test run, use 'Add all client errors to warning/ignored list' links.

Uncaught ReferenceError: g_form is not defined

 

In this step we are trying to click Approve button and it throws above error.

The previous steps are as follows:

 

1. "Impersonate a user (ABC approver)" (this user is created using create user step and have added the approver_user role)

2. "Record query" with below criteria

Approver = ABC Approver
and Approving = 981bbacd872XX710177a840XXXb3522
and State = Requested

 

3.  "Open an Existing Record" which basically opens the above record

4.  Click a UI Action.

and then error.

 

Thanks

 

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.
6 REPLIES 6

I'm using the ootb UI action 'Approve', so I'm not sure if we should modify that and not sure what should be the onClick condition in that case? Since this would be a global change I'm wondering if there is a better option to fix this .

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

lauri457
Tera Sage

Is it the step 4 click a ui action that fails? Is it ws or classic? Do you have something custom like ui scripts that could cause the behaviour? The test runner will just get the iframe element that has the form open and from it the g_form object similar how you can get the g_form in the browser console from the gsft_main iframe.

top.gsft_main.g_form
//klass {tableName: 'sys_atf_step_config', modified: false, modifiedFields: {…}, mandatoryOnlyIfModified: false, elements: Array(13), …}

 

Run the test and observe the test runner. What happens? What is the stack trace in the browser console when it fails?