I had trouble using the -userExtensions parameter in my RC batch file for including user-extensions. I also had trouble processing the instructions in the selenium documentation (found here: http://www.seleniumhq.org/docs/08_user_extensions.jsp#using-user-extensions-with-selenium-rc).
Instead of all the developer jargon, I simply cracked open the selenium-server-standalone-2.25.0.jar file using WinZip, and followed these instructions:
- Open the selenium-server-standalone-2.25.0.jar file using winzip an extracted the “user-extensions” file only to your C drive. So now you have the user-extansions.js in your C:\core\scripts folder.
- Edit the user-extensions.js by adding your extensions, just like you do with the IDE.
- Using Winzip again, add the modified user-extensions.js to the selenium-server.jar. For this,
- Open selenium-server.jar using Winzip.
- Use the “Add” button on the top bar of Winzip
- In the “Add” window, browse to C:\core\scripts\user-extensions.js file Make sure that the “Actions” choosen is “Add (and replace) Files” and “Save full path info” is checked in the “Folders” option.
- This will replace the user-extensions.js in the selenium-server.jar with our modified user-extensions.js with same path information.
- Close Winzip
Now the new selenium-server.jar is ready with your own user-extensions.
No custom processor calls or instantiation needed.
Note, that some IDE user extensions do not work, without modification, with RC. In many cases, the developer usually provided a version for the IDE and a version for RC. If that is the case for the extension you are adding, make sure to copy in the right extension from the correct source.