--- title: "Scripting" slug: "scripting" type: "index" canonical: "docs.catchpoint.com/scripting" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt > Use this file to discover all available pages before exploring further. # Scripting 56 articles ## [Script Converter Limitations](https://docs.catchpoint.com/docs/script-converter.md) Published on 2025-02-05 When converting a Selenium-based test to Playwright within the portal or via the API, Catchpoint automatically converts the test script as well. This streamlines the process of converting your tests,... ## [XPath Cheat Sheet](https://docs.catchpoint.com/docs/xpath-cheat-sheet.md) Published on 2025-01-15 XPath is a powerful tool for locating elements on a webpage. Here's a guide with beginner-friendly examples covering operators and functions. What is XPath? XPath (XML Path Language) is a query... ## [Puppeteer Scripting Guide](https://docs.catchpoint.com/docs/puppeteer-scripting-guide.md) Updated on 2026-03-04 | Published on 2024-09-05 Catchpoint.uploadFile(input, testfile) Puppeteer is a Node.js library that offers high-level browser automation through an intuitive API. With Catchpoint's Puppeteer test type, you can create... ## [Activating one test based on results from another](https://docs.catchpoint.com/docs/activating-one-test-based-on-results-from-another.md) Updated on 2023-03-07 Web applications and services are often hosted in multiple data centers (primary and backup). If performance degrades at the primary source, a failover may be necessary, shifting traffic to the backup... ## [AJAX in Transaction Tests](https://docs.catchpoint.com/docs/ajax-in-transaction-tests.md) Updated on 2025-06-11 Overview For Transaction tests, our agent waits for the Document Complete event before continuing each action listed under a step. This ensures that all referenced elements are present on a page. This... ## [Akamai Debug Header](https://docs.catchpoint.com/docs/akamai-debug-header.md) Updated on 2023-01-06 Overview Akamai provides debug data for content hosted by their CDN service. This data is useful when trying to assess issues with Akamai services. Accessing Data To access this data, the Pragma in... ## [Test Macros](https://docs.catchpoint.com/docs/test-macros.md) Updated on 2024-07-30 Macros are dynamic system keywords that allow you to include variable information in a test's Test URL, HTTP Header Request, Script, and Post Data fields. The macro is replaced by the system at the... ## [How to Handle JSON in Tests](https://docs.catchpoint.com/docs/how-to-handle-json-in-tests.md) Updated on 2023-01-06 Catchpoint treats JSON (JavaScript Object Notation) as flat text. In order to use Transaction and API tests to extract data from JSON and verify the values, use the following macros and commands:... ## [Selenium API Test Scripting](https://docs.catchpoint.com/docs/selenium-api-test-scripting.md) Updated on 2023-03-07 Catchpoint relies on a customized subset of the Selenium language to perform API tests. At the end of this article is a list of supported Selenium verbs. Configuration Catchpoint API Test scripts... ## [API Monitoring - HTTP Request Methods](https://docs.catchpoint.com/docs/api-monitoring-http-request-methods-1.md) Updated on 2023-01-06 Overview Catchpoint supports different methods in API monitoring. This article has information on how to implement requests by adding an extra parameter to the open verb, and pass along data... ## [Catchpoint Regular Expressions](https://docs.catchpoint.com/docs/catchpoint-regular-expressions.md) Updated on 2024-07-30 Overview Catchpoint uses Regular Expressions(regex or regexp) to search for data within strings. Regex is a special string that describes a search pattern to be applied to other text. Catchpoint... ## [Encoding Macros](https://docs.catchpoint.com/docs/encoding-macros.md) Updated on 2023-01-06 Overview The Encoding macros are primarily used in scripts written for the API monitor, but they can be used with the Transaction monitor as well. Example Some APIs require content to be encoded in... ## [Getting Started with Transactions A Step-by-Step Guide](https://docs.catchpoint.com/docs/getting-started-with-transactions-a-step-by-step-guide.md) Published on 2026-05-01 Welcome to our demonstration of Transaction Scripting using the Catchpoint UI. For this demonstration, we'll be using the Transaction Test Type and building a script from scratch. Let's step through... ## [Delaying Requests in Chrome Transaction Test](https://docs.catchpoint.com/docs/delaying-requests-in-chrome-transaction-test.md) Updated on 2023-05-17 Overview There is a third party service( https://app.requestly.io/ ) that can be used to delay requests in Chrome. You can use this method to simulate issues which cause slow loading of resources to... ## [Bypassing Confirmation Boxes in Transaction Script](https://docs.catchpoint.com/docs/bypassing-confirmation-boxes-in-transaction-script.md) Updated on 2025-06-11 During a web transaction, certain scripted commands may generate a prompt requiring an action by the user. If the user does not make a selection within the prompt, the transaction flow cannot proceed.... ## [More Working with XPATH](https://docs.catchpoint.com/docs/more-working-with-xpath.md) Updated on 2023-01-06 XPath is used to navigate through elements and attributes in a tree-structured document (XML or HTML). Selenium commands use XPath as an element locator. XPath can be tested for matching results using... ## [JavaScript History Access Restrictions](https://docs.catchpoint.com/docs/javascript-history-access-restrictions.md) Updated on 2023-01-06 Overview Catchpoint blocks all JavaScript that attempts to emulate a browser's back button. This is done to ensure each test on a node is independent and has no access to browser history. Blocked JS... ## [Perform a Right Click in Transaction Test](https://docs.catchpoint.com/docs/perform-a-right-click-in-transaction-test.md) Updated on 2023-01-06 JavaScript to trigger right-click event Right-click on webpage The right mouse button is often used to open contextual menus. For example, if you right-click on the Windows desktop, you may see a menu... ## [Variables in Transaction Tests](https://docs.catchpoint.com/docs/variables-in-transaction-tests.md) Updated on 2023-01-06 Selenium variables can be used to store and extract constants within Transaction tests. These constants can be used to pass variables from one step to another within a single test. The correct syntax... ## [Web Socket Test Scripting Guide](https://docs.catchpoint.com/docs/web-socket-test-scripting-guide.md) Updated on 2024-04-17 This article lists the commands supported by the Web Socket Test . Catchpoint's Web Socket Test supports the following Script commands: assertData() Syntax: assertData(text, format) Description: Works... ## [Working with XPaths](https://docs.catchpoint.com/docs/working-with-xpaths.md) Updated on 2023-01-06 Recording In certain cases, using the Catchpoint recorder may not produce the expected results. For example, consider a script to open Amazon.com, search for boots, and open the first result. The... ## [Fire Events and Monitor Events- Script Troubleshooting](https://docs.catchpoint.com/docs/fire-events-and-monitor-events-script-troubleshooting.md) Updated on 2025-07-09 Note This article discusses "events" that occur in the process of loading a webpage. Its purpose is to help you develop test scripts that take advantage of these types of events. Catchpoint also... ## [datetime() submacro](https://docs.catchpoint.com/docs/datetime-submacro.md) Updated on 2023-01-06 Alert webhook macros like alertProcessingTimestampUTC and alertCreateDateLocal returns the date and time in a concatenated format like 20170412105408131 . This may not not be easy/friendly to read. In... ## [Multi Step Transaction Actions WaitForNoRequest vs. WaitForElementPresent](https://docs.catchpoint.com/docs/multi-step-transaction-actions-waitfornorequest-vs-waitforelementpresent.md) Updated on 2025-06-10 Overview Catchpoint's Transaction Test support the Selenium language for scripting multi-step interactions with a website. A list of supported Selenium Actions can be found here . It is important to... ## [Click Action Does Not Work Properly](https://docs.catchpoint.com/docs/click-action-does-not-work-properly.md) Updated on 2025-06-18 Overview There are several different reasons why a click or clickAndWait action may not work properly. One common cause of this is when the webpage contains multiple objects with the same ID. While... ## [Finding an Element via Contained Text](https://docs.catchpoint.com/docs/finding-an-element-via-contained-text.md) Updated on 2023-01-06 Some websites have multiple elements that use the same class names, and provide no unique identifiers. In these cases, your scripts can target a specific element by matching its content with regular... ## [Handling Concurrent Logins](https://docs.catchpoint.com/docs/handling-concurrent-logins.md) Updated on 2023-01-06 There are a few methods for handling scripting for sites that don't allow or limit concurrent log-ins. The first approach is to simply distribute the test timing so that no two sessions overlap. In... ## [Scripting Recipe Application Logins](https://docs.catchpoint.com/docs/scripting-recipe-application-logins.md) Updated on 2023-01-06 This article provides scripting recipes for logging into to many common SaaS applications, including GoogleApps , Box , DropBox , GitHub , and PagerDuty . What you need: Active account with the SaaS... ## [Selecting an Element from the Parent](https://docs.catchpoint.com/docs/selecting-an-element-from-the-parent.md) Updated on 2023-01-06 When selecting an element that may contain the changing IDs and class names, or the same values as other elements, it's best to specify properites of a parent element that are not likely to change or... ## [Selenium Scripting Guide](https://docs.catchpoint.com/docs/selenium-scripting-guide.md) Updated on 2023-09-25 Overview Selenium is a suite of tools for testing browser-based interfaces and APIs. You can generate Selenium test scripts by "recording" live interactions with a web page, or by manually writing the... ## [Step Names in Transaction Scripts](https://docs.catchpoint.com/docs/step-names-in-transaction-scripts.md) Updated on 2023-01-06 In Transaction scripts, a new step begins whenever a new page is loaded using the open verb, and whenever a verb is appended with AndWait . By default, steps are named using the convention "Step - 1",... ## [Store JavaScript Variable and Data for Use in a Transaction Test](https://docs.catchpoint.com/docs/store-javascript-variable-and-data-for-use-in-a-transaction-test.md) Updated on 2023-01-06 Catchpoint Transaction tests use Selenium variables to store JavaScript data through the storeScriptVariable() command. The storeScriptVariable() command saves the value returned from executed... ## [Storing Global Variables in Transaction Scripts](https://docs.catchpoint.com/docs/storing-global-variables-in-transaction-scripts.md) Updated on 2023-01-06 Overview When using the same variables in more than one test, Global Variables can be implemented to perform a login step in one test, extract and save an authorization token, and then use it to... ## [Syntax for indexing XPath](https://docs.catchpoint.com/docs/syntax-for-indexing-xpath.md) Updated on 2025-06-11 Overview The Syntax for indexing XPath differs when used directly to reference an individual element on a page as opposed to xxxxxxxx. In such scenarios, it is necessary to use "()" to specify the... ## [Transaction Script Date and Time Addition and Subtraction](https://docs.catchpoint.com/docs/transaction-script-date-and-time-addition-and-subtraction.md) Updated on 2023-01-06 Catchpoint allows you to add formatted dates into Transaction scripts using the TimeTrim() and Time() macros. These macros return the current date formatted according to the parameters provided. If... ## [Utilizing IgnoreErrors command](https://docs.catchpoint.com/docs/utilizing-ignoreerrors-command-1.md) Updated on 2023-01-06 Syntax: ignoreErrors(int) Purpose Prevents a Transaction test from failing due to an error. Explanation This command lets you ignore errors (prevent test from ending). It takes one parameter which can... ## [Converting a md5 hash value to hex](https://docs.catchpoint.com/docs/converting-a-md5-hash-value-to-hex.md) Updated on 2023-01-06 Overview The API monitor supports the hash macro which can apply a specified hash algorithm to a given string. The default method used for hashing is md5 . Our md5 hashing algorithm differs from that... ## [Converting string to/from Base64](https://docs.catchpoint.com/docs/converting-string-tofrom-base64.md) Updated on 2023-01-06 Overview The sub-macro base64to() converts a string to base64. This can be used within an extract macro as a third parameter, or within a var macro. The sub-macro base64from() is used to decode a... ## [Caching in Transaction Tests](https://docs.catchpoint.com/docs/caching-in-transaction-tests.md) Updated on 2025-06-11 When running transaction tests on sites where most users are return visitors, it may be necessary to measure the performance when the page is cached vs not cached . For a multi-step transaction, the... ## [Native Input Events with typeKeys](https://docs.catchpoint.com/docs/native-input-events-with-typekeys.md) Updated on 2023-01-06 In some cases, typing into text fields does not produce the desired effect since certain JavaScript events are not triggered. To properly use native input events, you must first click the mouse on the... ## [No Popups Or New Window Tabs Allowed](https://docs.catchpoint.com/docs/no-popups-or-new-window-tabs-allowed.md) Updated on 2023-01-06 Transaction tests do not support loading pop-ups or new tabs. The test will remain focused on the original tab even after clicking on links that create popups or open new tabs. A workaround for this... ## [How to end a test on a non-timing-related event](https://docs.catchpoint.com/docs/how-to-end-a-test-on-a-non-timing-related-event.md) Updated on 2023-01-06 Overview Currently, there is no command for ending a test once certain data has been rendered on a page. Tests only end after a period of 2 seconds after Document Complete (in case of a web test) or... ## [Support for Single Page Application Testing](https://docs.catchpoint.com/docs/support-for-single-page-application-testing.md) Updated on 2023-01-06 Enhanced Wait Actions for Transaction scripts / Single Page Application tests For Transaction tests, the Catchpoint agent relies on the Document Complete event to continue each action listed under a... ## [Git Versioning – Python Script](https://docs.catchpoint.com/docs/git-versioning-python-script.md) Updated on 2025-06-18 Introduction This Git versioning script is built to automate the updating of transaction scripts within Catchpoint. Once the latest version of a transaction script is updated in Git, we can execute... ## [Setting Cookies in API and Emulated Test](https://docs.catchpoint.com/docs/setting-cookies-in-api-and-emulated-test-1.md) Updated on 2023-01-06 Cookies can be set by using the setHeader verb. In API and Emulated tests, this will only set cookies for the root request; redirects will not be passed with the cookie values. In such scenarios, an... ## [How to use the parseTime() and timeDiff() macro](https://docs.catchpoint.com/docs/how-to-use-the-parsetime-and-timediff-macro.md) Updated on 2023-01-19 Overview Catchpoint supports injecting dynamic content into scripts, the test URL field for web tests, header overrides, alert emails, and alert webhook templates. ParseTime() This is a sub-macro of... ## [Transaction verbs not supported in emulated tests are removed automatically](https://docs.catchpoint.com/docs/transaction-verbs-not-supported-in-emulated-tests-are-removed-automatically.md) Updated on 2023-01-19 Transaction verbs that are not supported in emulated tests will be removed after 24 hours when the script is saved. Note that this behavior is not replicable unless the script submission is made to... ## [Security of Credentials in Transaction Scripts](https://docs.catchpoint.com/docs/security-of-credentials-in-transaction-scripts.md) Updated on 2023-01-19 When a script is created in the portal, the contents of the script (and other associated configuration data) are transferred to the Catchpoint servers encrypted via HTTPS. They are stored encrypted at... ## [Enhanced Wait Actions For Ajax Webpages](https://docs.catchpoint.com/docs/enhanced-wait-actions-for-ajax-webpages.md) Updated on 2023-01-19 Catchpoint supports two custom actions in addition to what Selenium provides. These actions do not require () brackets, and they can be used in place of the pause verb. waitForNoRequest(waitTime) This... ## [OAuth Signature generation](https://docs.catchpoint.com/docs/oauth-signature-generation.md) Updated on 2023-01-19 It is possible to use OAuth credentials to create a signature, which can then be used for OAuth authentication. Depending on the site, this may generate a token which can be stored and then re-used in... ## [If and Switch Macros in Transaction Tests](https://docs.catchpoint.com/docs/if-and-switch-macros-in-transaction-tests.md) Updated on 2023-01-19 Overview This article explains some use-cases for the If and Switch dynamic macros within Catchpoint. These macros are helpful when you are using conditional parameters within transaction tests.... ## [Scripting Recipe Custom Metrics(Kaspersky)](https://docs.catchpoint.com/docs/scripting-recipe-custom-metricskaspersky.md) Published on 2026-05-13 Objective This article will give you an example of how to capture custom metrics from the Kaspersky homepage with the help of Catchpoint's insight feature and store the captured data to analyze it in... ## [Scripting Recipe Catchpoint REST API Transaction](https://docs.catchpoint.com/docs/scripting-recipe-catchpoint-rest-api-transaction.md) Updated on 2023-03-07 Objective This article will give you an example of how to create an API transaction script to access the Catchpoint Rest API. Prerequisites Access to Catchpoint portal Access to Catchpoint Rest API.... ## [Scripting Tips and Best Practices](https://docs.catchpoint.com/docs/scripting-tips-and-best-practices.md) Updated on 2024-10-28 Overview This article outlines best practices and tips for creating transaction scriptsfor a robust transaction creation. What you need: Knowledge in creating a Transaction Test in Catchpoint.... ## [Playwright Scripting Guide](https://docs.catchpoint.com/docs/playwright-scripting-guide.md) Updated on 2026-03-04 | Published on 2023-06-28 Playwright is a versatile end-to-end testing framework that provides high-level browser automation through an intuitive API. With Playwright, you can create multi-step browser transaction tests to... ## [Transaction Commands and Macros](https://docs.catchpoint.com/docs/transaction-commands-and-macros.md) Updated on 2023-09-25 This article contains a subset of transaction commands and macros to assist with scripting needs. Check back often as the list continues to expand. Request Commands open Syntax : open("url") Purpose :...