このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 3 / 昨日: 4
総計: 291
- Dokuwiki.fl8.jp(63)
- DokuWiki(40)
- インデックスメニューの設定(12)
- 13 CentOS6メール設定(11)
最近の更新
このページへのアクセス
今日: 3 / 昨日: 4
総計: 291
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/