Selenium Builder is a Firefox extension that allows you to record, save and play Selenium scripts. CrossBrowserTesting has created a plugin for Selenium Builder which allows you to run these Selenium scripts or suites of scripts against any of our Selenium enabled browsers. They can also be used with our Screenshot Tests to get a webpage into the correct state, like a special login, or clicking certain links before images are captured.
On this page:
Installing Selenium Builder
1. Go to http://seleniumbuilder.github.io/se-builder/ in Firefox and click Install:
2. On the Add-ons page, click Add to Firefox and you should see a message to allow the install, and the a prompt to restart Firefox:
3. Launch Selenium Builder from the Developer Tools and click Manage plugins:
4. Scroll down, and select Install for the option CrossBrowserTesting.com for Selenium Builder.
Recording a Selenium Script
1. To record a script, enter your URL and select Record:
2. Now inside the Firefox window with the desired URL loaded, take the actions for which you want to record and you will see each step appear in the extension:
3. Click Stop Recording once you are finished.
4. You can save your scripts locally via File->Save, and you can create suites, which are lists of scripts to execute in sequence.
Running the script as a Selenium Test on CrossBrowserTesting.com
1. Select Run->Run on CrossBrowserTesting
2. Enter your email and authkey for CrossBrowserTesting
3. Select each Config (Operating System/Device) and Browser you want to run the script on.
4. Click Run to see the script execute against only one browser
5. You can click Add to continue adding browsers to run against multiple browsers.
6. As the script is executed, you will see it progress through commands in the script. You can create a saved list of browsers, and either run individual browsers from this list or run all of them.
- To run a test “suite” ( a collection of Selenium Scripts ) against a browser at CrossBrowserTesting.com, select the Run Suite command and proceed as described above.
- If you enable Run->Share state across suite menu item, the entire suite will be executed against a single instance of the browser, i.e. it will not stop and restart a browser between each test in a suite. You will typically want to have this turned on.
Running the script for Screenshot Tests
- Select Run->Run on CrossBrowserTesting
- Enter your email and authkey for CrossBrowserTesting
- Enter a Selenium script name to be referenced later in the field provided.
- Click the Save script to screenshot advanced options button.
- On the Screenshot Run page , click Advanced Options and enable the Selenium Script option.
- Select the Selenium script name from the previous step. (If for any reason you are not seeing the newly saved script, try refreshing the browser)
- For best results, set the Screenshot Test URL to the same exact URL in the first step of the Selenium Script (where you started recording). In this way the Screenshot system will only load the URL one time.