我在Selenium工作了一段时间并进行了一些测试,结果非常好。现在我创建了一个测试用例,我想同时在IE,Firefox和Google Chrome上运行它。我已经单独运行它们,它们运行得很好,但我想知道是否有方法来更改脚本并将它们一起运行。我已经使用集线器和三个远程控件(Firefox端口= 5556,IE端口= 5557和Chrome端口= 5558)设置了网格。现在,当谈到剧本我设置了三名潜水员:在python中使用Selenium并行浏览器测试
def setUp(self):
# Setting up the driver for Firefox
self.driverFF = webdriver.Firefox()
...
# Setting up the driver for IE
self.driverIE = webdriver.Ie()
...
# Setting up the driver for IE
self.driverCh = webdriver.Chrome()
...
然后,我创建了三个不同的方法,并与每个驱动程序运行它们。我还没有测试,但我想知道:有没有一种有效的方法来做到这一点?
在此先感谢!
[如何同时运行多个硒Firefox浏览器?(HTTP的可能重复:// stackoverflow.com/questions/16551111/how-to-run-multiple-selenium-firefox-browsers-concurrently) – Windmill 2017-04-26 06:40:35