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