【发布时间】:2015-01-05 10:15:41
【问题描述】:
需要在不同的浏览器中连续运行测试(即首先在 Firefox 中,接下来在 chrome 中进行相同的测试..)。解决这个问题的最佳方法是什么?
我试图在 setUpClass 中放置循环,但它并没有真正帮助:
class UITest(LiveServerTestCase):
fixtures = ['initial_test_data.json']
@classmethod
def setUpClass(self):
for browser in [webdriver.Firefox(), webdriver.PhantomJS(), webdriver.Chrome()]:
self.selenium = browser
super(UITest, self).setUpClass()
【问题讨论】:
标签: python django testing selenium