尝试在使用Selenium的同一台计算机上同时运行多个进程。会发生这样的事情:
python my_selenium_process1.py &
python my_selenium_process2.py &
python my_selenium_process3.py &
据我所能测试的,这导致Selenium按顺序打开Firefox实例,这不是期望的行为。
附加说明:根据this question on superuser about multiple Firefox instances,方法是使用Firefox的--no-remote
启动标志。这似乎是一个很好的方法,但我不确定是否有一个更简单的方法来做到这一点,或者这是否就是我正在寻找的。
编辑:目的不仅仅是加速特定的测试用例,而是允许多个Selenium进程同时运行。
非常感谢!任何建议将不胜感激!
那么
检查这里的用法
https://github.com/OniOni/python-parallel-wd
您可以使用Selenium Grd 2
你考虑过实现一个selenium grid吗?
Selenium Grid将通过并行运行测试来帮助您进行扩展。只需使用以下命令设置集线器和节点:
对于集线器
对于节点
相关问题 更多 >
编程相关推荐