调用过程
driver.find_element(By.CLASS_NAME,"xxx")
报错提示
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".xxx"}
解决方法
打开文件
Python39\Lib\site-packages\selenium\webdriver\remote\webdriver.py
定位到850行,将代码修改为
value = '[class="%s"]' % value