Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

python - How to run multiple Selenium Firefox browsers concurrently?

Trying to run multiple processes concurrently on the same machine, which use Selenium. What would happen is something like this:

python my_selenium_process1.py &
python my_selenium_process2.py &
python my_selenium_process3.py &

As far as I have been able to test, this results in Selenium opening the Firefox instances in sequence, which is not the desired behavior.

Additional note: According to this question on superuser about multiple Firefox instances, the way to do this would be to use the --no-remote start up flag for Firefox. This seems like a good way to go, but I'm not sure if there is a simpler way to do it or if this is even what I'm looking for.

Edit: The purpose, more than speeding up a particular test case, is to allow multiple Selenium processes to run concurrently.

Thanks very much! Any suggestion will be appreciated!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
sudo easy_install -U python-wd-parallel

then

check the usage here

https://github.com/OniOni/python-parallel-wd


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...