[Solved] How do I make Selenium click on this button?


There are two buttons are present with the same xpath.

if you want to click first button then use below code

wait = WebDriverWait(browser, 10)
button= wait.until(EC.element_to_be_clickable((By.XPATH,'(//button[@class="Button"])[1]')))
button.click()

if you want to click the second button then use below code

  wait = WebDriverWait(browser, 10)
    button= wait.until(EC.element_to_be_clickable((By.XPATH,'(//button[@class="Button"])[2]')))
    button.click()

solved How do I make Selenium click on this button?