我使用Selenium在django(Python框架)中编写测试。当我跑步时:
python manage.py test myapp
然后,一个firefox窗口打开,但仍为空白。它停留了几秒钟,然后关闭,给我一个巨大的错误信息。很遗憾,由于安全问题,我无法发布错误消息。在
我使用的firefox版本是:Mozilla firefox 39
selenium版本是:2.4.2
我的测试测试.pymyapp中的文件:
from selenium import webdriver
from django.test import TestCase
class MySampleTest(TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitely_wait(3)
def tearDown(self):
self.browser.quit()
def test_mytest(self):
self.browser.get('http://www.google.com')
当我运行我的测试时,它会在这一行显示一个错误:
self.browser = webdriver.Firefox()
请帮忙。谢谢您。在
最有可能的是,根据您所描述的并考虑到Selenium2.4.2非常古老,这是由于}之间的兼容性问题。升级
selenium
和{selenium
至最新版本(当前为2.46):相关问题 更多 >
编程相关推荐