0

I has clicked in the button, but the code stop and doesnt continue

print("I gonna click in the toaster")
site.find_element(By.XPATH,"//div[text()='Clique para visualizar']").click()
print("The toaster was clicked")

When python click in the button it freeze and the only return in terminal is 'I gonna click in the toaster'

when i click in the button, it disappear and a new window is opened

I tried put a implicitly_wait and not work I tried put a sleep time but also not work

1
  • Please make sure that you have that element Commented Jan 5, 2024 at 14:05

1 Answer 1

0

It might be due to the fact that the new window takes some time to fully load, and Selenium is waiting for the page to stabilize before proceeding. Make sure to adjust the timeouts in WebDriverWait according to the expected loading times of your application.

Sign up to request clarification or add additional context in comments.

1 Comment

No, the new window is loaded in the same moment, i wait it for 30 minutes and the code continue freeze

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.