But that does not create a proxy chain – it just creates a failover chain, where the browser will use the Selenium RC proxy and only if that doesn't work will it use your proxy.)

For most cases though, there is a simple solution. We don't actually need our requests to the domain under test to pass through Selenium RC – we only need the requests for the selenium wrapper stuff to go to it, so that they appear in domain.

So if we can make the requests to /selenium-server/ go to Selenium RC, and everything else go straight to the other proxy server, everyone's happy.

You don't need to make your own proxy PAC files and explicitly start browsers, as there is a -avoidProxy Selenium RC option to do it.

From this you can see that it will use our proxy on port 8090 as desired.

One catch you can also see, however, is that it will bypass the proxy for *.local sites – so don't use that as your hostname for the domain under test. Similarly, it bypasses the proxy for sites identified by IP address (rather than by name) and using just one (!?) of the private IP address ranges, so use named hosts instead.