Plugin (formatter) for Se-builder that generates javascript from Se-builder scripts to use in New Relic Synthetics Scripted Browser tests.
There is now a New Relic Synthetics exporter built-in to Katalon Recorder, an actively-updated IDE for synthetic testing.
- Install Katalon Recorder from the Chrome Web Store (no extensions needed!): https://chrome.google.com/webstore/detail/katalon-recorder/ljdobmomdgdljniojadhoplhkpialdid
- GitHub repo: https://github.com/katalon-studio/katalon-recorder/
I have tested the plugin with the new version of se-builder and it works fine! You can use that version if you want, installed from here: https://addons.mozilla.org/en-GB/firefox/addon/selenium-builder/
The only change in the installation is the location of the plugin. It is now placed in SeBuilder3/plugins
instead of SeBuilder/plugins
. Can't find the plugins directory? Check here!
Limitation of Selenium Builder 3: local playback does not work. If you want to record a script and replay it after tweaking, you'll need to run a Selenium Server somewhere. That's easy enough to do. It can be run locally on your laptop.
This formatter plugin is tested and compatible with the old version of Se-Builder, which is an unisgned plugin. The old version of Se-Builder no longer runs in Firefox by default. See https://support.mozilla.org/en-US/kb/add-on-signing-in-firefox for a workaround. NOTE: This workaround may not work for the most recent versions of Firefox. If that's the case, either use an older version of Firefox, or use Selenium Builder 3 (now that the plugin supports it).
- Old version: Se-Builder 2: https://github.com/SeleniumBuilder/se-builder/
- New version: Selenium Builder 3: https://github.com/SeleniumBuilder/selenium-builder/
Download the plugin: Download link
- Download & install either Se-builder v2 or v3:
- Firefox ESR 52 or the last pre-quantum release, Firefox 56. Selenium Builder is currently not compatible with Firefox Quantum (Firefox 57+)
- Se-builder 2.
- Selenium Builder 3
- Run Se-builder at least once before proceeding. Running it the first time creates the folder where you'll put the plugin. Run it by going to Tools > Web Developer > Launch Selenium Builder.
- If you haven't already, Download the plugin!
- Unzip the plugin into the
SeBuilder/plugins
(v2) orSeBuilder3/plugins
(v3) directory on in your Firefox profile. Your folder structure should look like this:- Can't find the Se-builder plugins directory? Check here
- Restart the se-builder if you still have it running. You don't have to restart Firefox, just exit and re-open Se-builder.
- To verify that the plugin is loaded, click "Manage plugins" in the opening dialog box. You should see "New Relic Synthetics Formatter #.# Installed" in the Plugins list.
- If the Manage Plugins page throws an error, don't fret! This may be a issue with se-builder that doesn't impact the plugin. If it does happen, try recording a simple script and exporting it. If you see "New Relic Synthetics (WebDriverJS)" in the File -> Export dialog, the plugin is working properly.
- If it didn't load, try restarting Firefox entirely and then re-running Se-builder.
- Write, record or open a test.
- Be sure to create in "Selenium 2" format, or convert your existing script to it.
- Check out the Se-builder Getting Started Guide for more details on creating/recording scripts.
- Export your test to Synthetics format
- Once you have a script ready to export, in the menu bar, click File --> Export...
- Click "New Relic Synthetics (WebDriverJS)"
- Save the result to any name and location you want, so long as you can find it!
- When saving, add ".js" to the end of the file name so that it looks pretty in your text editor of choice.
- Create a new Scripted Browser monitor in Synthetics
- Click "Add New Monitor" in the main screen of Synthetics or visit https://synthetics.newrelic.com/accounts/[your_account_id]/monitors/new
- Choose "Scripted Browser" as the monitor type, and then set the name, locations & frequency as you like.
- In the "Script your steps" window, clear the contents there and paste the contents of your exported script.
- Be sure to click "Validate" below this window pane to ensure that the script works properly.
- Please submit an issue to this github repo by clicking the "Issues" link on the right-hand menu and then click "New Issue"
- Please cut-and-paste the following detail into the issue:
- Your original script created in se-builder - either in HTML or JSON format
- The exported javascript file you pasted into Synthetics
- The error messages and logs returned when you ran/validated your script
- Please be patient! Unfortunately, maintaining this script is not my day job, but I will get to your issue as soon as I can.
Here are some common locations for the plugins directory:
- Mac:
/Users/[you]/Library/Application Support/Firefox/Profiles/[your_profile]/SeBuilder/plugins
- Win:
C:/Users/[you]/Appdata/Roaming/Mozilla/Firefox/Profiles/[your_profile]/SeBuilder/plugins
- Linux/Unix:
~/.mozilla/firefox/[your_profile]/SeBuilder/plugins
- Mac:
/Users/[you]/Library/Application Support/Firefox/Profiles/[your_profile]/SeBuilder3/plugins
- Win:
C:/Users/[you]/Appdata/Roaming/Mozilla/Firefox/Profiles/[your_profile]/SeBuilder3/plugins
- Linux/Unix:
~/.mozilla/firefox/[your_profile]/SeBuilder3/plugins
It may be hidden from view in your Finder. Here's how to unhide it:
- Open your Home folder in Finder.
- Right-click in the finder window and click "Show View Options", or open it by pressing ⌘-J.
- Check the box next to Show Library Folder.