Record your transactions on the website using Selenium IDE and later create scripts of the recording.

Prerequisites

  • Use Chrome browser version 69 or above.
  • Install the latest Selenium IDE in the Chrome browser.

Install Selenium IDE extension in the browser for the first time

Use the Selenium IDE extension from Google Chrome to record the transactions. To add the Selenium IDE extension, click Install Selenium IDE.

  • Add Selenium IDE as an extension to the browser.
  • OpsRamp supports Selenium IDE extension in Google Chrome versions above 69.

Record a transaction using Selenium IDE

After installing the Selenium IDE, start recording each action performed on a website. After completing the recording of the transaction, Selenium IDE reviews each recorded action and saves the recording to the location.

Start recording

Start recording the transaction using the Selenium IDE extension installed in the Chrome browser.

  1. Click the Selenium IDE extension icon displayed in the Chrome browser. Welcome to Selenium IDE! window is displayed.
    Welcome to Selenium IDE
  2. Click Record a new test in a new project. For an existing project, click Open an existing page and select the project from its saved location.
  3. From the Name your new project window, provide a name for the project in the Project Name field. For example: Enter PROJECT 1 in the Project Name field.
    Project Name
  4. Click OK to proceed.
  5. From the Set your project’s base URL window, enter the URL in Base URL.
    Base URL
  6. Click START RECORDING.
  7. Navigates automatically to the URL entered in the Base URL field. For example: Navigates automatically to the login page of URL: https://ne.app.try.opsramp.com.
    Starts Recording
  8. Perform all transactions on the website. The Selenium-IDE captures all actions performed on the website while recording.
  • The browser window displays Selenium IDE is recording… throughout the recording process.
  • Selenium IDE does not record a few commands and must be manually entered by the user.

Stop recording

After capturing the actions on the website, stop recording the transaction in the Selenium IDE.

  1. Click Stop Recording icon in the Selenium IDE window.
  2. From Name your new test screen. enter the name of the test in TEST NAME. For example, enter TEST 1 in the TEST NAME field.
    Test Name
  3. Click OK to proceed further. Navigates to the Selenium IDE window.
  4. The Command, Target, and Value columns display the actions, paths, and values entered on the webpage while recording the transaction.
    Selenium After Recording

Review recording

After the recording stops, use Run current test icon to inspect the issues in the saved recording. for any issue, use Start Recording and Stop Recording to repeat instructions.

The Log section in Selenium IDE displays the following:

  • Details for each reviewed step.
  • A completed successfully message after finishing the review process.

Save recording

After the successful completion and review of the recording, save the recorded script to a local machine as a .side file.

  1. Click Save in the Selenium IDE window. Save the file to a location in the local machine.
  • Ensure to save the file as the .side file type.
  • Selenium IDE saves the .side file using the project name configured during the creation of the new project.
  1. Open the .side file from the saved location in the local machine to view the file contents.
    .side File

After the successful completion and review of the recording, save the recorded script to a local machine as a .side file.

Upload contents from .side file to OpsRamp

After achieving the .side file, configure the SCRIPT – HTTPS Synthetic Transaction monitor and upload the contents from .side file to the console. The Script Type section in the console consists of two sections: Selenium JSON Script and Selenium Python Script.

After selecting the synthetic monitor type, to configure the SCRIPT – HTTP Synthetic synthetic monitor:

  1. Enter details for the following parameters and click Save:

    • Name: Name of the synthetic monitor. The Add Synthetic window displays an error message Name Already Exists when a unique value in the Name field is not provided.
    • Script Type: Content that you upload.
      • Paste the JSON content from the .side file in the Selenium JSON Script tab. Use the Selenium Python Script tab to paste the Python script.

        See Python Synthetic Transaction Examples.

      • Use only one tab to paste the script.

      • If the Selenium IDE cannot do the recording for a certain event (Example: Drag and Drop), leverage the Selenium Python Script option. For any questions, contact OpsRamp Support.

      • Python script runs only from private locations.

    • Locations: Locations from where you want to monitor. The screen displays a confirmation message about the successful addition of the synthetic monitor.
  2. Click OK. The Synthetics page displays the configured synthetic monitor.

The Synthetics page under Infrastructure displays the availability status of the monitor as a red flag if the configured transaction does not complete in the configured Connection Timed Out value.

To manage a configured synthetic monitor:

  • Edit – To modify the existing details of the configured synthetic monitors.
  • Delete – To remove the configured synthetic monitor.
  • Scheduled Maintenance – To move any configured synthetic monitor to Scheduled Maintenance.

After configuring, view metrics, and graphical representations for more information.

Metrics for SCRIPT monitor types

Monitor TypesUnitsRecommended MetricsDescription
SCRIPT-availability.down.location.countLocation Count: The number of locations where the configured host is down
SCRIPTMillisecondssynthetic.response.timeResponse time: TTime taken to complete a task in a website

Graphical representation for metrics

Graphical Representation

Credential set for SCRIPT monitor

Using the Credential Set, you can assign credentials to override the username/passwords that you use while recording a transaction.

To add the credential set into the transaction includes:

  • Creating and assigning credentials to the Script monitor.
  • Overriding the original credentials from the transaction in the Selenium IDE.

Create and assign credentials

From the Credentials tab, create and assign credentials to the script monitor.

To create a credential set:

  1. Select a client from the All Clients list.

  2. Go to Infrastructure > Resources > Synthetics.

  3. Click the SCRIPT monitor.

  4. Click Credentials.

  5. Click + Add.

  6. From the Create New Credential screen, enter the details for the following parameters and click Save:

    • Name: Name of the credential set.
    • Description: Reason for creating the credential set.
    • Type: Collector type. Select HTTP from the drop-down list.
    • Username: Username of the credential set.
    • Password: Password that you set for the credential set.
    • Confirm Password: Same password that you provide in the Password field.
    • Port: Port used to connect to the application.
    • Is Secure: Select the checkbox to enable.
    • Connection Time Out (ms): Time in milliseconds that occurs as a result of a script exceeding the maximum time-out value. The Credentials tab displays the created credential set.

The credentials sets get assigned automatically after a credential set is created from the Credentials tab. Use Assign to add credentials from the existing list of credential sets.

To assign a credential set:

  1. From the Credentials section, click + Assign.
  2. From Assign Credentials screen, select the credential set and click + Assign. Credentials screen displays the list of assigned credentials.

You can click Unassign to remove the assigned credentials.

Override the original credentials from the transaction in the Selenium IDE

The main purpose of using a credential set is to ensure the security of the credentials that you provide while recording a transaction from the Selenium IDE. For example, if the transaction involves logging into a website, you can override the original credentials with the assigned credential set in the Value field using a key from the Selenium IDE. OpsRamp recommends the following syntax while adding the credential set in the Value field:

  • Username: $CREDENTIAL SET NAME.USERNAME
  • Password: $CREDENTIAL SET NAME.PASSWORD
Credential Set

Advanced settings

Use Advanced Settings > Configure to edit each action while running the script.

  1. On the Add Synthetic page, click Advanced Settings > Configure.
  2. On the HTTP Synthetic Transaction – Actions page, click the edit icon to modify the transaction name.
  3. Provide a message in the Action Error Message section. The root cause analysis section in Location Availability displays the customized message when a transaction error occurs.
  4. Click Done.

Next steps

  • Assign appropriate templates for SCRIPT – HTTPS Synthetic Transaction monitor using Device Management Policy, Assign Templates, or on the resource itself.
  • Check response time for each metric and configured location in the graph from the Overview section. The graph displays only up to 20 metric points. To view other metric points, select the event names from the Select Instances drop-down.