如何同时运行多个Selenium Firefox浏览器? [英] How to run multiple Selenium Firefox browsers concurrently?
问题描述
python my_selenium_process1.py&
python my_selenium_process2.py&
python my_selenium_process3.py&
就我所能测试的结果而言,Selenium会依次打开Firefox实例,这是不是所需的行为。
其他注意:根据,要做到这一点的方法是使用 - no-remote
为Firefox启动标志。这似乎是一个很好的方法,但我不知道是否有一个更简单的方法来做到这一点,即使这是我正在寻找。
编辑:其目的不仅仅是加速特定的测试用例,而是允许多个Selenium进程同时运行。
非常感谢!任何建议将不胜感激!
sudo easy_install -U python-wd-parallel
然后
检查这里的用法 p>
https://github.com/OniOni/ python-parallel-wd
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!
sudo easy_install -U python-wd-parallel
then
check the usage here
https://github.com/OniOni/python-parallel-wd
这篇关于如何同时运行多个Selenium Firefox浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!