chrome 84 webdriver 与 selenium 3.141.0 兼容吗?

Is chrome 84 webdriver compatible with selenium 3.141.0?

我正在尝试使用 selenium 3.141.0 和 chrome 84 驱动程序的自动化项目。但是尽管添加了正确的 ID 和详细信息,代码还是卡住了。请问是兼容性问题还是其他问题

请帮帮我!

是的,应该是 - 我尝试了 selenium 3.141.0 和 chrome 84 驱动程序(我从 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载了 Mac 版本)并且它有效。

您确定您的驱动程序与您的浏览器二进制文件兼容(这是我之前使用 selenium 时 运行 遇到的一个问题)?您收到的错误消息是什么?

我正在做一个 FB 自动化项目。

from selenium import webdriver

from time import sleep

driver=webdriver.Chrome(r'C:\Users\samar\OneDrive\Desktop\MAIN\projects\Jarvis\chromedriver.exe')

driver.get('https://www.facebook.com')

email=driver.find_element_by_xpath('.//*[@id="email"]')

email.send_keys('username')

password=driver.find_element_by_xpath('.//*[@id="pass"]')

'''with open('pass.txt','r') as myfile: password1=myfile.read().replace('\n','')'''

password.send_keys('password')

login=driver.find_element_by_id('u_0_b')

login.click()

sleep(3)

postarea=driver.find_element_by_xpath('//*[@id="mount_0_0"]/div/div[1]/div[1]/div[3]/div/div/div[1]/div[1]/div/div[2]/div/div/div[3]/div/div[2]/div/div/div/div[1]/div')

postarea.click()

sleep(3)

activepostarea=driver.switch_to_active_element()

activepostarea.send_keys("Hello World")

但是因为登录后进入了FB主页。弹出一条消息,要求获得通知权限,即允许或阻止。然后就出现了下面的错误。

raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="mount_0_0"]/div/div[1]/div[1]/div[3]/div/div/div[1]/div[1]/div/div[2]/div/div/div[3]/div/div[2]/div/div/div/div[1]/div"} (Session info: chrome=84.0.4147.135)