Troubleshooting a script

If a script fails to play back successfully, there are several steps you can do to solve the problem.

For more information, refer to the Advanced scripting guide.

Wait issues

A script waits for the page in the Navigation action to complete loading. Make sure that the Wait actions are waiting long enough before the script tries to continue. Use the Wait setting to add additional time if necessary.

Verify that the appropriate type of Wait action has been used for the type of network activity. For example, only use a Wait for Page Complete if a new page navigation is taking place.

Locator issues

Sometimes the playback agent cannot use a locator during playback. The locator term may be too general to locate a specific element out of all the elements on the page. The website may serve different content depending on the browser. You may have to supply a locator for the element. Firebug, Firefinder, and the IE Developer toolbar are valuable tools for finding ways to create unique, valid locators.

Debugging scripts

You may have to add debug statements to your script to help you troubleshoot an issue. Add a JavaScript alert, using any action that accepts JavaScript, such as a custom action, in the location of the script to troubleshoot. Run your script and view the Debug Alert tab when you play back the script.