Identify and resolve client errors
Identify client errors and resolve them in client-side scripts.
Avant de commencer
Pourquoi et quand exécuter cette tâche
When client errors occur, the Automated Test Framework fails the test on the step that was executing when the error occurred. Even though client-side scripts can fail silently on JavaScript errors while procedures are executing, the error may still impact data, and the procedure being executed. The Automated Test Framework considers these errors as validation failures.
Procédure
Que faire ensuite
Example client errors
There are several types of common client error.
Client JavaScript errors
When a client script causes an error, the browser console displays an error similar to the following example:
***************************************************
A script has encountered an error in render events
TypeError: Cannot read property 'id' of undefined
Script ends. Continuing happily
***************************************************
[00:00:00.002] onLoad Modify Comments LabelIn this example, the client script Modify Comments Label caused the error.
Other client script errors
Any other type of script error reports directly to the browser console with any formatting upon occurrence.
TypeError: callbacks(id) is undefined
Script resource links by Sys ID
In some cases, the console error provides a link to the script resource file using its Sys ID. Following this link may give context to which script had executed it.
Uncaught ReferenceError: myobj is not defined
at incident.do?sys_id=12345678901234567890123456789012
(anonymous) @ incident.do?sys_id=12345678901234567890123456789012 <---- LINK
Script access permissions
- Access control rule permissions for tables and fields.
- Application access permissions if the script accesses applications in a private scope.
- Domain separation permissions if domain separation is configured.