Information:

Environment

  • Dynatrace Portal
  • Dynatrace  Recorder
Symptoms

  • Troubleshooting custom JavaScript
Solution

The Dynatrace Recorder has the ability to add alerts for JavaScript statements to a script. You can use this ability to identify errors when troubleshooting a script that contains Custom actions. It can be used in any target window, including the control window.

The best way to create an alert is to use a try/catch statement. Use the following pseudo code as the basis for the alert:

for(var i = 0; i < array.length; i++){ try{ <ENTER CUSTOM CODE HERE> } catch(err){ alert(err); } }

The result will be an alert in the Debug Alerts tab of the Recorder, and a alerts.log file when test that uses the script runs on the Dynatrace Portal.

 

 

 

 

  • No labels