Recording synthetic scripts
Before you begin
- You must use the Firefox web browser when recording scripts
Selenium IDE is available only as a Firefox add-on. If Selenium IDE is not installed or running, complete the following steps:
- Ensure that you are running a version of Firefox 60 or later that supports
Selenium IDE 3.2.X or 3.3.X. If you have a later version of Selenium
IDE, it is not supported; you must uninstall it and install version 3.2.X or 3.3.X.Note: By default, Selenium IDE is automatically updated after you install version 3.2.X or 3.3.X. Turn off automatic updates for Selenium IDE to prevent version upgrades.
- Download and install Selenium IDE 3.2.X or 3.3.X from the Selenium home page (https://addons.mozilla.org/firefox/addon/selenium-ide/versions/). Allow Selenium IDE to install all plug-ins.
- After Selenium IDE is installed, restart Firefox.
- Navigate to the web page that you want to test and close any other tabs. To open Selenium IDE, click Selenium IDE window, ensure that the Base URL field contains the URL of the displayed web page. Selenium IDE starts recording all user actions on the displayed web page. . In the
- Ensure that you are running a version of Firefox 60 or later that supports Selenium IDE 3.2.X or 3.3.X. If you have a later version of Selenium IDE, it is not supported; you must uninstall it and install version 3.2.X or 3.3.X.
- Selenium .side script format
Scripts created with newer versions of Selenium use the ..side format. With Selenium IDE 3.2.X or 3.3.X, you can import older scripts that were created with the .html format and save to the .side format. For more information, see Updating scripts from earlier Selenium IDE versions.If you will be using Selenium .side scripts, you must first install these updates:
- IBM Cloud Application Performance Management V220.127.116.11 Synthetic Playback agent Interim Fix 5 or later on the systems where you installed the Synthetic Playback agent.
- Contact IBM to ensure your Cloud APM subscription has been updated to IBM IBM Cloud Application Performance Management, Private Cloud APM V18.104.22.168 Server Interim Fix 8 or later.
- If you are using an Availability Monitoring
private point of presence (PoP), check that the synthetic PoP build number is
APM_201903090832or later by entering the cat build.info command from the PoP installation directory. Earlier build versions do not support .side format.
About this task
In this task, you perform user actions on a web page and use Selenium IDE to record these actions as commands in a simple script. You can use scripts to monitor the performance and availability of your web application in the Application Performance Dashboard.
Complete the following steps to record a script of user actions on a web page:
Click Record to start recording a script. Perform user actions on your
web page, such as clicking a link.
For every user action on a web page, Selenium IDE records a command and adds it to a script.
For example, complete the following actions to record when a user loads the IBM Marketplace web page and navigates to a free trial of Cloud APM, in a script:
Table 1. Recorded user actions and Selenium IDE commands User action Commands added to script To record when the Cloud APM web page on the IBM Marketplace website opens, open the IBM Marketplace web page. Right-click anywhere on the displayed web page and select open.
To ensure that the script checks that the web page loads, right-click the title text of the web page (IBM Cloud Application Performance Management) and click.
To record when the user clicks a link to view details about Cloud APM, click the Details link. The Details page loads.
To ensure that the script checks that the Details page has loaded, right-click on the
Feature spotlightsheading and select .
To record when the user clicks a link to view details about how to purchase Cloud APM, click the Purchase link. The Purchase page loads.
To record when the user clicks a button to register for a free trial of Cloud APM, click the Try Free button.
- In the Selenium IDE window, click Record to stop the recording. Click the Save Project tool, give your script a meaningful name, and save as a .side file (such as open_webpage.side).
In the Selenium IDE window, review your recorded script. Click the Table
tab to display the script in a table format. In the Selenium IDE window, click Play
Current Test Case to test the playback of the script that you recorded.
In this example, Selenium IDE displays the script of user actions on the IBM Marketplace website, as described in step 1.
Table 2. Example of a Selenium IDE script recording of user actions on the IBM Marketplace website Command Target Value
IBM Cloud Application Performance Management
css=ul > #details > a
css=ul > #purchase > a
What to do next
If you recorded a complex script, you can organize your script into simpler scripts, where each script represents a specific business process or user action on your web application. For more information, see Structuring complex scripts.
Use the Synthetic Script Manager to upload your script file to a new or existing synthetic transaction. For more information, see Creating and editing a synthetic transaction.