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

The SN Nerd
Giga Sage
Giga Sage

Turn on the JavaScript log and perform it manually. Look out for JS errors.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

I will try that now thank you!


Showed no errors but thank you anyway


Can you post your UI Action code?



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022