chromedriver_binaryでserviceオブジェクトの書き方がわからない

378 views
Skip to first unread message

junichi izukoe

unread,
Aug 21, 2023, 9:08:12 AM8/21/23
to 日本Seleniumユーザーコミュニティ
chromeのバジョンアップによりseleniumが動かなくなってしまいました。
selenium 4.9.1
Python 3.10.12
Ubuntu 22.04.3 LTS

chromedriver_binaryをインストールしました。
chromedriver-binaryは、PythonのパッケージとしてChromeDriverを自動的にダウンロードし、適切な場所に配置するためのパッケージとのことです。

下記の書き方がわからない。
chromedriverのあるパスはlinuxコマンドのecho $PATHで調べました。

chrome_pass = 'chromedriverのあるパス'
service = Service(executable_path=chrome_pass)
driver = webdriver.Chrome(options=options)

# ログインページを開くm
driver.get("https://www.google.co.jp")


Reply all
Reply to author
Forward
0 new messages