私は非常に簡単なコードを書いています。クロムブラウザウィンドウが開きますが、代わりにエラーメッセージが表示されます。Selenium - ブラウザは開けません
これは私のコード
from selenium import webdriver
chrome_path = "C:\\Users\\Admin\\Documents\\chromedriver"
driver = webdriver.Chrome(chrome_path)
であり、これは私がシェルに表示されるエラー
Traceback (most recent call last):
File "C:/Users/Admin/AppData/Local/Programs/Python/Python35-32/te.py", line 3, in <module>
driver = webdriver.Chrome(chrome_path)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
self.service.start()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
stdout=self.log_file, stderr=self.log_file)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
これは何ができるか任意のアイデアですか?
'driver = webdriver.Chrome()'の何が問題なのですか?私はそれだけではない理由があるのですか? –
それはどちらでも動作しません。 –
恥、申し訳ありませんが、私はほとんどの時間をfirefoxを使用してこの問題に遭遇したことはありません –