Selenium is not recognizing the class. I was trying to click an audio button on a website using selenium but it is not recognizing this class
class="jumbo--Z12Rgj4 buttonWrapper--x8uow audioBtn--1H6rCK"
Here is my code
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
options = webdriver.ChromeOptions()
options.add_argument(r"user-data-dir=./c")
driver=webdriver.Chrome(executable_path=r"C:UsersUsersDesktopScrappingchromedriver.exe",options=options)
driver.get(r"https://www.xx------xx.com")
button5 = driver.find_element_by_class_name(r"jumbo--Z12Rgj4")
button5.click()
But selenium is throwing an exception
jumbo--Z12Rgj4
Exception:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".label--Z12LMR3"}
question from:
https://stackoverflow.com/questions/65625726/why-selenium-not-recognizing-class-in-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…