2016-12-22 6 views
0

Splinterのドキュメントでは、次のように述べています。Splinter Documentation instructions for chrome drivers私はWebブラウザの自動化にsplinterを使いたいと思っていました。それだけで動作していない

そして、パスを追加しました。 :: Path of the environment variable where chrome driver is located

マイコード:

from splinter import Browser 
executable_path = {'executable_path':'C:\Program Files (x86)\Google\Chrome\Application\chrome'} 
browser = Browser('chrome', **executable_path) 
browser.visit('https://google.com') 

しかし、私はそれを実行したとき、私はこのエラーを取得:

"C:\Program Files\Python35\python.exe" C:/Users/vedan/PycharmProjects/erevna/erevna-splinter.py 
Traceback (most recent call last): 
File "C:/Users/vedan/PycharmProjects/erevna/erevna-splinter.py", line 4, in <module> 
browser = Browser('chrome', **executable_path) 
File "C:\Program Files\Python35\lib\site-packages\splinter\browser.py", line 63, in Browser 
return driver(*args, **kwargs) 
File "C:\Program Files\Python35\lib\site-packages\splinter\driver\webdriver\chrome.py", line 31, in __init__ 
self.driver = Chrome(chrome_options=options, **kwargs) 
File "C:\Program Files\Python35\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__ 
self.service.start() 
File "C:\Program Files\Python35\lib\site-packages\selenium\webdriver\common\service.py", line 96, in start 
self.assert_process_still_running() 
File "C:\Program Files\Python35\lib\site-packages\selenium\webdriver\common\service.py", line 109, in assert_process_still_running 
% (self.path, return_code) 
selenium.common.exceptions.WebDriverException: Message: Service C:\Program Files (x86)\Google\Chrome\Application\chrome unexpectedly exited. Status code was: 0 
Process finished with exit code 1 

私は同じ悩みを持っていたもの

答えて

0

を行うには見当がつかないGoogle Chromeで私の場合、これはクロムドライバのバージョンのために起こった。しかし、これはそれを更新した後に解決されました。クロムドライバーとクロムの間のこの問題です。たぶんそれはあなたに役立つでしょう。最新バージョンはこちらからダウンロードできます: https://github.com/peterhudec/chromedriver_installer.git

関連する問題