开发者

Selenium, Using multiple firefoxProfileTemplates at once / specifying from selenium object rather than at server launch?

开发者 https://www.devze.com 2023-01-18 07:48 出处:网络
I am using Selenium RC for website testing and I need to use multip开发者_如何学运维le proxies at once and am doing this using: firefoxProfileTemplate when I start the selenium server. This, however,

I am using Selenium RC for website testing and I need to use multip开发者_如何学运维le 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消