How to add jQuery (Sizzle) selectors to Selenium

First, download Sizzle, which is a selector engine for jQuery and unpack sizzle.js to a convenient location.

Second, create empty user-extensions.js file. Name can be whatever you want by the way.

Add this to user-extensions.js

PageBot.prototype.locateElementBySizzle = function(locator, inDocument) {
  var results = [];
  window.Sizzle(locator, inDocument, results);
  return results.length > 0 ? results[0] : null;

Third, go to Selenium IDE, Options -> Options… and add sizzle.js and user-extensions.js to “Selenium Core extensions”.

Restart Selenium IDE (just close all instances of it and open it again), and now you can use sizzle=(locator) everywhere, where “locator” is needed