How click in Button with Selenium python


I want to click the configuration button, which leads to discord profile information,

enter image description here

Guys, I want to click on the gear at the bottom, how can I do this? This is my code:

option = Options()
driver = webdriver.Chrome(options=option)
wait = WebDriverWait(driver, 5)              
wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'a.item'))).click()
wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div#contents-18-Yxp"))).click()

Can anyone help me with this problem?


you can click it with this code:

driver.find_element_by_css_selector('div'[aria-label="User settings"]').click()

Answered By – shiny

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published