I've been trying to click in a button and haven't success. Want to acess line 130 Começa a new gameline 130 "Começa a new game"

It has two class="responsive-lg" and the I Want is the second.

I need help to overcame that! I've try: https://sqa.stackexchange.com/questions/28145/selenium-how-to-click-a-button-using-the-button-label?newreg=5abdc140835243d7aa6c3f8ab8f592e8 https://stackoverflow.com/questions/18753629/how-to-click-image-icon-using-selenium-webdriver?newreg=7e95e546f58a48dfbdf7c15acac104f8

  • What's the issue you facing and also add the html as code not inage
    – PDHide
    Apr 11 at 10:59
  • I've already overcome the "such" problem, n also did not know that is forbidden post images
    – Kali Chad
    Apr 12 at 15:42

If you are sure that your search criteria is the text, you can use XPath:

"//*[text()='Começa a new game']"
  • Thanks. It Works.
    – Kali Chad
    Apr 12 at 15:26
  • I also fount other way: link = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, "//div[@class='p-5']/div[4]/button[1]")))
    – Kali Chad
    Apr 12 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.