• IE Agent
  • FF Agent
  • Dynatrace Recorder

  • Skip a step within a script based on a conditional statement. For example:
    • Security Questions
    • Error Pages

Create a Custom action in the "control" target window, using  a modified version of the code below.

Note that the steps and actions are arrays. Each element in that array will start at 0. Step 1 will look like script.steps[0].


var loc = new Locator({'targetWindow':'gomez_top[0]',locators:[['dom', 'document.documentElement']]});
var element= loc.execute();
if (element.innerHTML.indexOf('Security Questions') == -1){
script.steps[5].actions[1].type ='do_not_execute';
script.steps[5].actions[2].type ='do_not_execute';
script.steps[5].actions[3].type ='do_not_execute';

Pseudo Code

If the base page does not have the text Security Questions

Do not execute Action 2 of Step 6

Do not execute Action 3 of Step 6

Do not execute Action 4 of Step 6


Also see Scripting Conditional Pages in the documentation.





  • No labels
  1. Anonymous (login to see details)

    How would I use this to answer security questions? Where would I add the questions? The solution mentions an example script that is attached but I don't see any attachments. I'm trying to record a script that will need to answer security questions from time to time.