このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 4 / 昨日: 3
総計: 295
- Dokuwiki.fl8.jp(126)
- DokuWiki(34)
- FreeBSD カーネル再構築(22)
- tuned(10)
- 06 WireGuard(9)
最近の更新
このページへのアクセス
今日: 4 / 昨日: 3
総計: 295
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/