Selenium-RC: Help with XPath

XPath is as useful for Selenium-RC as it is for Selenium-Core.  You can use the same techniques for evolving XPath expressions for testing with RC. Read the XPath Help

page for Core.

Using XPath Checker and Firebug with RC

Selenium-RC launches its own Firefox browser, without the plugins you may have installed for your Firefox.  You can hack Selenium-RC to put in Firebug and XPath Checker. You may be in the habit of pausing tests in the middle of a run, and kicking off Firebug so you can confirm XPATH for certain widgets, fields, etc.

Firebug

Instructions here are for a Mac, with Firebug already installed into Firefox.

Start in the dir that you have the Selenium-RC server jar in.  And run these commands in order to add Firebug to that jar in the right way (change STUPID-PROFILE-ID to be whatever Firefox has set your random profile ID):

mkdir foo
mkdir foo/customProfileDirCUSTFFCHROME
mkdir foo/customProfileDirCUSTFFCHROME/extensions
cp -R ~/Library/Application\ Support/Firefox/Profiles/STUPID-PROFILE-ID/extensions/firebug\@software.joehewitt.com foo/customProfileDirCUSTFFCHROME/extensions/
cd foo/
cp -R foo/customProfileDirCUSTFFCHROME foo/customProfileDirCUSTFF
jar -uf ../selenium-server-x.y-standalone.jar  .

If you're not on a mac, then modify the above to make sense for your operating system.

XPath Checker

Brian has a small bug in the naming of his plugin, so that its a little harder to copy into Selenium-RC

(TODO)