3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Seleniumを最新ドライバーで実行する方法

Last updated at Posted at 2021-06-16

以前から嘆いていた、定期的にWEBドライバを差し替えないと問題が
webdriver-managerを使用すると解決することがわかりました!

詳細はこちらで確認できます。
https://pypi.org/project/webdriver-manager/

まずはさっそくインストールしていきます。

pip3 install webdriver-manager

ドライバの起動は次のように書くと実行できます。

Seleniumの起動
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

url = ''
driver.get(url)

これで、たまに使うときの再インストールの手間をなくすことができます。

3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?