我有一個工作筆記本硒,這是我沒有了三個星期的使用,現在崩潰:-(與網絡chromedriver掙扎
看來我並不孤單: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1548
我明白的Chrome版本的變化,將54版最近,和做舊硒的版本崩潰
以下幾個博客,我終於再次的webdriver下載: https://sites.google.com/a/chromium.org/chromedriver/
和以下歌劇驅動程序(是的,我也試過opera: - /) https://github.com/operasoftware/operachromiumdriver/blob/master/examples/desktop.py
我仍然有問題。
因此,這裏的日誌:
from selenium import webdriver
from selenium.webdriver.chrome import service
webdriver_service = service.Service('/Users/romain/anaconda/bin/chromedriver_bug')
webdriver_service.start()
driver = webdriver.Remote(webdriver_service.service_url, webdriver.DesiredCapabilities.OPERA)
,並提供:
driver.get('https://www.google.com/')
WebDriverException: Message: session not created exception
from unknown error: bad inspector message: {"method":"Page.loadEventFired","params":{"timestamp":88165,388799}}
(Session info: chrome=54.0.2840.87)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.12.0 x86_64)
我怎麼改變的webdriver?我只是將unziped文件複製到〜/ Anaconda/bin/webdriver中。 這是正確的方法嗎?
編輯==================
我所做的:
$ pip install -U selenium
Requirement already up-to-date: selenium in /Users/romain/anaconda/lib/python2.7/site-packages
我下載了Chrome瀏覽器,驅動程序從:https://chromedriver.storage.googleapis.com/index.html?path=2.25/
我打開[chromedriver_mac64 (1).zip
]並獲取[chromedriver
]文件,我將其放置在[~/anaconda/bin
]之下。
我:
$ which jupyter
~/anaconda/bin/jupyter
我所做的:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.google.com/')
同樣,如果我這樣做:
from selenium import webdriver
from selenium.webdriver.chrome import service
webdriver_service = service.Service('/Users/romain/anaconda/bin/chromedriver')
webdriver_service.start()
driver = webdriver.Remote(webdriver_service.service_url, webdriver.DesiredCapabilities.OPERA)
driver.get('https://www.google.com/')
最新版本的selenium獨立服務器和chromedriver? – lauda
我沒有線索: - /我該如何檢查? –
檢查http://www.seleniumhq.org/download/並獲取最新版本。 – lauda