我正在与Selenium合作一段时间并进行一些测试,这很棒。现在我创建了一个测试用例,我想在IE,Firefox和谷歌Chrome上同时运行它。我已经单独运行了它们运行得很好,但我想知道是否有办法改变我的脚本并将它们一起运行。
我已经设置了一个带有集线器和三个遥控器的网格(Firefox端口= 5556,IE端口= 5557,Chrome端口= 5558)。现在谈到脚本我设置了三个潜水员:
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()
...
然后我创建了三种不同的方法并使用每个驱动程序运行它们。我还没有测试过,但我想知道:有没有一种有效的方法可以做到这一点?
提前致谢!
答案 0 :(得分:0)
查看Selenium Grid 2文档,它应该对您有所帮助。我希望运行并行测试并遇到这些指南。
https://code.google.com/p/selenium/wiki/Grid2
在这里: http://www.guru99.com/introduction-to-selenium-grid.html
在这里: https://www.packtpub.com/sites/default/files/downloads/Distributed_Testing_with_Selenium_Grid.pdf
里亚兹