Automated Testing Framework: This step failed because a client-side Javascript error was detected on the page being tested

LMR
Mega Expert

I am currently making a Automated Test that tests the Incident Application. My test is failing when I instruct the test to click the Assign to Me UI Action. After a series of steps that created the Incident record, and populated certain fields, as well as impersonating a Fulfiller, I used the Test Step UI Action Visibility and the test passed. I then created the Click a UI Action Test Step, ran the test, and it failed. I proceeded to look at the Test Results Test Log and saw this:

find_real_file.png

I then went to the screenshots the the ATF provided and noticed something odd...

find_real_file.png

The ATF apparently clicked the Assign to Me UI Action. I know this because:

        1. I have a Business Rule that sets the Incident State field when the Assign to Me UI Action is clicked and the           Assigned To field is populated.

        2. The Incident State field is now Active and no longer New.

        3. The Assigned To field is populated with the ITIL Fulfiller that I instructed the ATF to impersonate.

I'm kind of confused as to why this test is failing, while in the Client Test Runner I'm watching it do as I ask. I am also unsure as to why the Uncaught ReferenceError: current is not defined error is generating as well.

13 REPLIES 13

Yes I've been noticing a lot of errors/Tests failures when dealing with the Catalog Task [sc_task] table and the Requested Item [sc_req_item] table. Whether it's a Record Query, Opening an Existing Record, etc it results in some type of failure. My clients are in the middle of upgrading to Istanbul, so I was half blaming the errors on that.


arpitatambi
Kilo Contributor

We already upgraded Istanbul as testing is only in Istanbul, still seeing all the issue with running all the testscripts.


joel_fischer
ServiceNow Employee
ServiceNow Employee

Hi Lea,



The following article explains what to do when you see this error.



Automated Test Framework: "This step failed because a client-side Javascript error was detected" error is displayed


https://hi.service-now.com/kb_view.do?sysparm_article=KB0623238


We recently upgraded to Jakarta and have been having numerous issues with ATF and Change Request forms.   I chased down all of the references to various Business Rules, Script Includes, UI Actions, etc and successfully tested each component individually.   It seems to be more of a timing issue than anything related to evalJSON.   Rather than create another HI ticket on it, I'll await the outcome of this one.