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

在使用selenium+phantomjs的时候在Windows平台下可以正常工做,在Linux下却不能,并获得错误信息:web

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

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

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

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

相关文章
相关标签/搜索