I've been switching over our company's automation scripts from Selenium IDE to Selenium 2.0 WebDriver. The problem is that we have a crap load of user extension custom commands because of all the AJAX our sites do. So there are a lot of custom commands (selectors). I can't figure out how to get user extensions working without the IDE (when just using webdriver). Can this be done? If not, what is the alternative so we can still use jQuery in the new method? If you have a simple example of the alternative, even better.
Here is an example of how we used jQuery in the IDE user extensions (js file added in options in Selenium IDE). We had to make sure our site was injecting the jQuery script. In the IDE, we had a custom command named "getUlLiCount" and "getUlLiCountAndWait" (this one is created by default).
function jQuery(selector)
{
return selenium.browserbot.getUserWindow().jQuery(selector);
}
Selenium.prototype.doGetUlLiCount = function(ulName, varStore) {
this.doStore(jQuery('#' + ulName + ' > li').size(),varStore);
};