Selenium-RC: Troubleshooting FAQ

Having trouble? We have listed some of the regularly troublesome ones below.

If not, try our user forums.  

When first starting the server, I get this error message: "(Unsupported major.minor version 49.0)"

This is Java's extremely unhelpful error message telling you that you're not using the correct version of Java. The Selenium Server requires Java 1.5 or higher; this typically happens when you use Java 1.4 instead of 1.5. Try running this from the command line:
java -version

You should see a brief message telling you what version of Java is installed, like this:

java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)
If you see a lower version number instead, you may need to install a newer version of the JRE, or you may need to add it to your PATH environment variable.

During the tutorial, I get a 404 error when running the getNewBrowserSession command!

First, finish reading the tutorial. Make sure you read the section about the "Same Origin Policy" carefully.

If you're getting a 404 error while attempting to open a page on "http://www.google.com/selenium-server/", then it must be because the Selenium Server was not correctly configured as a proxy. Remember, that directory doesn't really exist on google.com; it only appears to exist when the proxy is properly configured.

Now the question to ask is: why isn't my proxy properly configured? There are a number of possible reasons, depending on which way you launched your browser: with *firefox, *iexplore, *opera, or *custom.

During the tutorial, I can't access Google when running the "open" command!

First, finish reading the tutorial. Make sure you read the section about the "Same Origin Policy" carefully.

There's a couple of possible reasons this might be happening:

Why am I getting a Permission Denied error when using Selenium RC?

This usually happens because you have run afoul of the Same Origin Policy. If your browser session starts on one origin, but then you attempt to load up a page from another origin (with a different domain, protocol or port), you'll run into these Permission Denied errors.

In most cases, you can remedy this just by making sure that your browser session starts on the right origin. You can't test www.google.com from a browser session starting at google.com, so you'll just need to start your browser session differently.

If for some reason you absolutely need to be able to access websites on multiple domains, then right now the only way to do that is to use one of our experimental browser launchers.

Selenium Server launches the browser in just one particular configuration (pop-ups blocked, etc.). I need to test running the browser in a different configuration. How do I do that?

Normally Selenium RC automatically configures your browser, but if you launch your browser using "*custom" as your browser launcher, you can force Selenium RC to launch the browser as-is, without changing your configuration. (Note that this is also the way you launch other browsers that Selenium RC doesn't yet explicitly support.)

For example, you can launch Firefox with a custom configuration like this:

cmd=getNewBrowserSession&1=*custom c:\Program Files\Mozilla Firefox\firefox.exe&2=http://www.google.com

Note that when we launch the browser in this way, you'll have to manually configure your browser to use the Selenium Server as a proxy. (Normally this just means opening your browser preferences and specifying "localhost:4444" as an HTTP proxy, but instructions for this can differ radically from browser to browser, so consult your browser's documentation for details.)

Beware that Mozilla browsers can be a little fidgety about how they start and stop. You may need to set the MOZ_NO_REMOTE environment variable to make Mozilla browsers behave a little more predictably. Unix users should avoid launching your browser using a shell script; always prefer to use the binary executable (e.g. firefox-bin) directly.

If you attempt to launch a *custom browser but don't configure the proxy correctly, you won't be able to get through even a simple Google test, because you'll get a 404 (File not found) error trying to access http://www.google.com/selenium-server/. Remember, that directory doesn't really exist on Google.com; it only appears to exist when the proxy is properly configured. If you get this error, double-check that you've configured your proxy settings correctly. Note that in some browsers it's very easy to make a mistake and change the wrong settings, thinking that you've configured your proxy, when you've really had no effect at all.

One way to tell whether you've configured your proxy correctly is to attempt to intentionally configure your browser incorrectly. Try configuring your browser to use the wrong proxy server hostname, or the wrong port. If you've successfully configured your browser's proxy settings incorrectly, your browser will be unable to connect to the Internet, which is one way to make sure you're adjusting the relevant settings.

For example, you might try configuring your browser to use the proxy server "asdflkjdasf" on port "1234". Then try connecting to google.com in the ordinary way, and doing a search. If you connect successfully to google.com, then you must not have really changed your proxy settings at all! You might also try turning your Selenium Server off while using the correct settings (localhost on port 4444). You should not be able to connect to Google if your proxy is disabled. If it seems like you can, then you know you've almost certainly made a mistake.

Note that this problem can be especially troublesome on Internet Explorer, which can sometimes ignore whatever proxy settings are configured, even manually! (This normally happens when you're using a dial-up Internet connection, or if you're using a VPN). In that case, you may not be able to configure your proxy at all. As a workaround, you may be able to use the experimental *iehta browser launcher instead.

On Linux, why isn't my Firefox browser session closing?

On Unix/Linux we need to invoke "firefox-bin" directly, so make sure that executable is on the path. If we're forced to execute Firefox through a shell script, when it comes time to kill the browser Selenium RC will kill the shell script, leaving the browser running.

If necessary, you can specify the path to firefox-bin directly, like this:

cmd=getNewBrowserSession&1=*firefox /usr/local/firefox/firefox-bin&2=http://www.google.com