views:

25

answers:

1

I am using Selenium RC for website testing and I need to use multiple proxies at once and am doing this using: firefoxProfileTemplate when I start the selenium server. This, however, doesn't allow me to multi-thread selenium as each selenium object still uses the same firefoxProfileTemplate, and therefore the same proxy, (I am using Python to control / interact with selenium) as they all have the same proxy.

I am wondering if there is a way to specify the firefoxProfileTemplate when I launch the selenium object / open a web page with selenium rather than just when I launch the server. Alternatively, is there a way to run multiple instances of the selenium server and specify which one to interact with? Thanks for any advice.

+2  A: 

Since Selenium Rc is the mechanism to start browser the only way to do what you want is with multiple rc instances. When starting it add -port #### and give your instances unique port numbers.

When you create a selenium object you do sel = Selenium('localhost', ####, '*firefox', 'http://foo.bar')

As a side note in Selenium 2 which is in alpha you can build all of this programatically since there is no reliance on RC.

AutomatedTester
Thanks, I did figure a solution to this from searching around more and you are completely right.. I had to figure out how to start multiple RC instances on different ports, but its pretty simple, more the issue was doing it programatically so I can start a bunch from python / kill them later, etc
Rick