我用pytest和selenium。我有一个简单的设置:
browser = webdriver.Firefox()
使用py.test test_foo.py
运行测试文件时
firefox浏览器正确启动,获得了url并顺利地执行了测试。在
然后我创建了另一个python文件testsuite1.py,其中包含
pytest.main('py.test test_foo.py')
我运行了python testsuite1.py
,它打开了Firefox浏览器,但未能获得URL并完成测试。失败的错误:
WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
我在谷歌上搜索了很多关于这个问题的帖子,但没有找到任何解决办法。我已经使用firefox40更新到Selenium 2.47.1。我不明白为什么它能和py.测试命令与否pytest.main在python中。在
有什么想法吗?在
目前没有回答
相关问题 更多 >
编程相关推荐