このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 4 / 昨日: 3
総計: 315
- Dokuwiki.fl8.jp(39)
- DokuWiki(17)
- FreeBSD カーネル再構築(10)
- 01 Galera構築(7)
最近の更新
このページへのアクセス
今日: 4 / 昨日: 3
総計: 315
Chrome DriverのPathを下記のように明示的に指定してない場合、どうなるのか。
driver = webdriver.Chrome(options=options)
この場合でも環境変数のPathのChrome Driverが存在するディレクトリが指定されていれば、Pathを明示的に指定してなくても動作する。
「スタート」ボタンをクリックし、検索ボックスに「環境変数」と入力します。 -
driver = webdriver.Chrome(executable_path="/path/to/chromedriver")
executable_pathは現在非推奨なので、下記のほうが良さそう。
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
global_service = Service(executable_path=ChromeDriverManager().install())
driver = webdriver.Chrome(service=global_service, chrome_options=options)
参考: https://yuki.world/python-selenium-chromedriver-auto-update/