'Service' object has no attribute 'process'

在使用selenium+phantomjs时,运行总是出现错误信息:

'Service' object has no attribute 'process'

出现该错误的原因是未能找到可执行程序"phantomjs",这时可以这样:

driver = webdriver.PhantomJS('/path/to/phantomjs')

也可以通过重启pycharm来解决ORZ。

原文地址:https://www.cnblogs.com/xzysaber/p/6265380.html