'Uncaught ReferenceError: current is not defined'

theBeastMaster
Mega Guru

I am getting below error while executing the test cases:

 

This step failed because the client error 'Uncaught ReferenceError: current 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.

 

I got this error in the test step 'click a UI action' where I am clicking on a button to perform a few tasks.

 

It was working fine earlier. But, not sure why suddenly getting this error. Even in the ATF screenshot, I could see that on click of UI action, it navigated to the next screen. But, still got the error.

 

Please advise.

1 ACCEPTED SOLUTION

theBeastMaster
Mega Guru

It got automatically resolved and I didn't do anything to fix it. Thanks everyone for your response.

View solution in original post

7 REPLIES 7

Inactive_Us1931
Giga Expert
Hi, Looks like you are using 'current' object in client side UI Action, so you are getting this error. Please refer the below thread. https://community.servicenow.com/community?id=community_question&sys_id=f315cf1bdb3467482be0a851ca9619f8&view_source=searchResult Please Mark it correct/helpful, if it helps you. Regards Sachin

Hi Sachin,

 

Thank you for your response!!

I already had a look at that link and I have already mentioned that it was working fine earlier. Also, I am not getting any error while creating the record manually.

 

Thanks

Hi,

Can you try running it manually i.e. click the UI action and check any logs

Also can you share the UI action code?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Inactive_Us1931
Giga Expert
Hi, Can you check like this UI Action is modified recently? This error is not specific to ATF test step. It might comes even if you click on that UI Action manually. Your instance is in which version? Thank you. Regards, Sachin