SeLite Bootstrap (Components > Bootstrap) allows smoother development of Selenium Core extensions (just in plain Javascript files, not packaged as .xpi). It reloads them automatically on change.

It’s more convenient than Selenium IDE’s way of loading Core extensions (Selenium menu > Options > Options > General > Activate developer tools), which requires you to apply Selenium menu > Options > Options > General > Reload button every time you change your extension file.


It adds field bootstrapCoreExtensions to Settings module extensions.selite-settings.common, where you can choose file(s) containing your Core extension in Javascript (saved in UTF-8). Configure that through values manifest with SettingsManifests > Literals for special values > SELITE_THIS_MANIFEST_FOLDER. That makes your scripts shareable.

If you modify any one file that is registered with Bootstrap (while using Selenium IDE), all the registered files get re-loaded automatically

Apply JavascriptEssential, especially sections Strict Javascript and Prevent name conflicts.

It works only in standalone Selenium IDE, but not in auxiliary Selenium IDEs inside browser (neither in Selenium IDE in browser sidebar).



Bootstrap reloads all registered extensions (whenever you modify any one of them). You can ‘extend’ existing Javascript functions as per JavascriptSpecial > Function intercepts. However, don’t re-save and re-extend the current function each time the Javascript is run. Otherwise it would increase the intercept chain every time Bootstrap reloads it. Instead, save the original function on the first load only, but re-extend it on every load. For example:

var originalMethod;
if( originalMethod===undefined ) {
    originalMethod= Selenium.prototype.methodName;
Selenium.prototype.methodName= function(pqr...) {;
    // extra new tasks...

See also JavascriptSpecial > Function intercepts.

Adding/modifying Selenese commands

If you introduce or modify any Selenese commands - i.e. Selenium.prototype.doXyz, Selenium.prototype.getXyz or Selenium.prototype.isXyz - then those will be available to your case/suite only after you run any Selenese command first.

Switching between files

If you remove a filename from bootstrapCoreExtensions (or you switch to a different default set or a suite with a different set associated with it), Bootstrap can’t ‘unload’ a file that it has loaded already. If you change that option later and you add the filename back, it won’t re-run the file, unless its timestamp has changed.

Dependencies between files

Bootstrap initiates extensions after any Core extensions loaded as Firefox add-ons (whether they use Extension Sequencer or not).

If you have multiple files registered with Bootstrap through a values manifest, they get loaded in that order. However, if you register multiple files through profile-based configuration (as per SettingsInterface), their order is not guaranteed. Then you need more structure for that: package them as Firefox extensions and load them through Extension Sequencer.

On change, Bootstrap re-loads all registered files, not just the one(s) updated. That allows dependant files (that were registered with Bootstrap through a values manifest) to inject any hooks in the expected order.