Error running python selenium webdriver for chrome browser on aws ec2

0
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("--headless")
driver = webdriver.Chrome(options=options, executable_path=r'/usr/bin/chromedriver')
driver.get("http://google.com/")
print ("Headless Chrome Initialized")
driver.quit()

Error Enter image description here

已提問 1 年前檢視次數 1149 次
1 個回答
0

Not very sure which ec2 machine (along with OS) + Chrome versions being used but from the exception "selenium. common. exceptions. SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80" it looks you may have to revisit/check your installation and its version of Chrome and its driver.

profile pictureAWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南