Information:

Environment

  • Dynatrace Recorder
Symptoms

Sometimes different browsers have different behaviors (for example, the index of frames might be different) when interpreting a piece of HTML source code.

Solution

For example, to use a script for both the IE Agent and the Firefox Agent when the behavior is different depending on the browser type:

1. Add a Custom action in the script timeline.

2. Put the following code in the Custom action:

"
var ua = window.navigator.userAgent.toLowerCase();
IF (ua.indexOf("IE")!=-1)
    {.......}
else
    {.......}
"
3. Put the code for the behavior of the IE Agent inside the braces following the IF statement.
4. Put the code for the behavior of the Firefox Agent inside the braces following the ELSE statement.

 

 

 

 

 

  • No labels