The recording of the transaction involves the following three steps:
- Step 1: Installation of Selenium IDE extension in the browser for the first time.
- Step 2: Record a transaction using Selenium IDE.
- Step 3: Upload contents of the .side file to OpsRamp.
Step 1: Installation of Selenium IDE extension in the browser for the first time
Use the Selenium IDE extension from Google Chrome to record the transactions. To add 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.
Step 2: 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 desired location.
To record a transaction:
Sub-step 2a: Start recording using Selenium IDE
Start recording the transaction using the Selenium IDE extension installed in the Chrome browser.
To start recording a transaction:
- Click the Selenium IDE extension icon displayed in the Chrome browser.
Welcome to Selenium IDE! window appears.
- Click Record a new test in a new project.
Note: For an existing project, click Open an existing page and select the project from its saved location.
- 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.
- Click OK to proceed.
- From the Set your project’s base URL window, provide the desired URL in Base URL.
- Click START RECORDING.
- 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.
ImportantThe browser window displays Selenium IDE is recording… throughout the recording process.
- Perform all transactions on the website.
The Selenium-IDE captures all actions performed on the website while recording.
NoteSelenium IDE does not record a few commands and must be manually entered by the user.
Sub-step 2b: Stop recording
After capturing the desired actions on the website, stop recording the transaction in the Selenium IDE.
To stop the recording:
- Click Stop Recording icon in the Selenium IDE window.
- 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.
- Click OK to proceed further. Navigates to the Selenium IDE window.
- The Command, Target, and Value columns display the actions, paths, and values entered on the webpage while recording the transaction.
Sub-step 2c: 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.
Sub-step 2d: Save recording
After the successful completion and review of the recording, save the recorded script to a local machine as a .side file.
To save the recording:
- Click Save in the Selenium IDE window.
Save the file to a desired 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.
- Open the .side file from the saved location in the local machine to view the file contents.
Step 3: 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:
- Provide details for the following parameters and click Save:
- Name: Refers to the name of the synthetic monitor.
Note: The Add Synthetic window displays an error message Name Already Exists when a unique value in the Name field is not provided.
- Script Type: Refers to the 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.
- 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: Refers to the desired locations from where you want to monitor.
The screen displays a confirmation message about the successful addition of the synthetic monitor.
- Name: Refers to the name of the synthetic monitor.
- Click OK.
The Synthetics page displays the configured synthetic monitor.
WarningThe Synthetics page under Infrastructure displays the availability status of the monitor as a red flag if the configured transaction does not complete within the configured Connection Timed Out value.
- To monitor and edit each action performed while running the script, click Advanced Settings > Configure from the Add Synthetic screen.
To edit the name of the actions available in the script:
- From the Add Synthetic screen, click Advanced Settings > Configure.
- From the HTTP Synthetic Transaction – Actions screen, click the edit icon to modify the transaction name.
A text box along with the tick-mark appears. Make the desired changes in the text box.
- Click Done.
ImportantConfigure appropriate templates for SCRIPT – HTTPS Synthetic Transaction monitors, using Device Management Policy, template assign, or on the resource itself.
- To monitor the response time of each action for existing SCRIPT synthetic monitors, click Edit from Settings > Advanced Settings > Configure.
- After configuring the SCRIPT synthetic monitor, check the response time for each metric in the graph from the Overview section.
- The graph displays only up to 20 metric points. To view the other metric points, select the desired event names from the Select Instances drop-down.
- The SCRIPT – HTTPS Transaction Synthetic monitor also displays the graphs for the configured locations. For example, Frankfurt, DE:: Response Time.