selenium.common.exceptions.TimeoutException: Message: Screenshot: available via screen


在使用selenium+phantomjs的时候在Windows平台下能够正常工作,在Linux下却不能,并得到错误信息:

selenium.common.exceptions.TimeoutException: Message: 
Screenshot: available via screen

在ST上找到答案:http://stackoverflow.com/a/36159299/4447404

driver = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

在初始化driver时传入参数"service_args=['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1']"即可。



 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM