7
6

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 1 year has passed since last update.

SeleniumとChromeDriverManagerについて(備忘録)

Posted at

Seleniumでexecutable_pathが廃止されたことで


webdriver.Chrome(ChromeDriverManager.install(), options=options)

という今までの書き方ができなくなりました。

この書き方をすると


TypeError: __init__() got multiple values for argument 'options'

というエラーがでます。

対処法は


service = Service(executable_path=ChromeDriverManager().install())
webdriver.Chrome(options=options, service=service)

です。

参考資料

seleniumドキュメント
selenium github コミットログ
Selenium4 WebDriver の executable_path 使用に伴う警告の回避方法
7
6
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
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?