Script mode for browser monitor configuration

In addition to the usual configuration in the UI, you can use Script mode to configure your clickpath or single-URL monitors. In this mode, you can access the underlying JSON script of your monitor. If you're a synthetic power user, this will make your life a lot easier and allow you to speed up clickpath creation and management. Use the script editor to quickly find specific events (steps), adapt locators across the whole script, or edit parts of the clickpath without rerecording.

You aren't limited to just one mode—you can switch back and forth between the UI and script modes by clicking the Clickpath/Script switch.

Access the clickpath script

To edit your clickpath browser monitor in script mode:

  1. Go to Synthetic Classic.
  2. Select the clickpath monitor you want to edit.
  3. Click the Browse button () and select Edit.
  4. Click the Recorded clickpath tab in the Monitor settings menu on the left.
  5. Click Script at the top.

Access the single-URL script

To edit your single-URL browser monitor in the script mode:

  1. Go to Synthetic Classic.
  2. Select the single-URL monitor you want to edit.
  3. Click the Browse button () and select Edit.
  4. Click the Monitor script tab in the in the Monitor settings menu on the left.

Edit the script

You can download the script (Download script as .json) or just copy it from the editor and edit it in a text editor of your choice. However, you can also edit the script directly in the browser. This provides the following benefits:

  • Autocomplete—just press Ctrl+Spacebar to see a list of suggestions.
  • Syntax highlighting makes it easier for you to write script code.
  • Instant error validation—the editor instantly shows a warning for any error in the script. Hover over the error to see what's wrong and a suggestion for how to fix it. You cannot save changes until the code is error free.

Note that you need to escape all special characters and break lines with a backslash (for example, a new line is \n, double quotes is \", and tab is \t).

You can play your changes back for clickpath scripts without saving them—just click Play back clickpath.

Script structure