首页 > 使用webdriver.PhantomJS()出错

使用webdriver.PhantomJS()出错


请问各位大神,这是什么情况???


详见http://stackoverflow.com/questions/36153...
Solved by changing function in selenium.webdriver.phantomjs.service.py like follow:

was

def send_remote_shutdown_command(self):
    if self._cookie_temp_file:
            os.remove(self._cookie_temp_file)

after adding try/except construction:

def send_remote_shutdown_command(self):
    try:
        if self._cookie_temp_file:
            os.remove(self._cookie_temp_file)
    except PermissionError:
        pass

重启下电脑试试。

【热门文章】
【热门文章】