Check out the Selenium exporter to New Relic Synthetics: Synthetics Formatter for Selenium IDE - Chrome Web Store
Similar to the Katalon script exporter, Selenium IDE allows you to record the steps you want to monitor in Synthetics, by simply following those steps in your site.
The exporter allows you to take your Selenium script and format it in a way that can work in New Relic Synthetics.
In most cases, the Selenium IDE generates simple and easy to understand CSS selectors and XPath when compared to Katalon recorder. In a sample recording of navigating to the New Relic site and clicking a drop down item, the table below shows the different selector choices generated by each recorders:
|Step||Katalon Recorder||Selenium IDE|
|Click ’ Products and Pricing ’||xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘WHY NEW RELIC’])/following::span||css=#nav1 > .title|
|Click ’ New Relic APM: Detailed performance metrics. For every app. In any environment. ’||xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘New Relic One’])/following::img||linkText=Detailed performance metrics. For every app. In any environment.|
Selenium IDE is a lot easier to read, right?
Selenium IDE also allows you to include the original Selenium code as comments when you export in a different format, as you will for Synthetics.
There are a few setup steps, listed below;
- Download and install the Selenium IDE from the Chrome web store
- Download and install the New Relic Selenium IDE plugin from the Chrome web store.
Start recording, when done export as New Relic Synthetics script by selecting New Relic Synthetics from the list of supported languages . For details on how to use the Selenium IDE code export functionality please go here.
- Enhanced “Step logging”.
Logging has been enhanced to generates custom Insights events for each “logged step”, for example calling logger.log() would generate an Insights event:
logger.log(1, “Open URL https://www.newrelic.com/”, “Open page”);
This makes it possible to inspect each steps and render the data in a chart like a funnel to show test completion.
Note : enhanced logging is DISABLED by default.
- Exporting a test suite would generate a single Synthetics script with multiple test cases.
As you can see below, there are two tests in the Test suite, coming through in one Synthetics script.
Please note that this is offered for use as-is without warranty. You are free to use and modify as needed. It has been created for use with New Relic, but is not a supported product of New Relic.
If you do have any questions or enhancement requests, please add these to the Github Issues page. Feel free to add in your own pull requests too.