0

I have been trying to automate clicking on a pop up as soon as the site opens up but the error "selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed from unknown error: web view not found" is shown. and the pop up doesn't close.

I tried to execute following statements:

**driver.find_element(By.NAME,"bBPb-close").click()**

on the following html code:

The pop up didn't close and an error occurred.

hmmm
  • 1
  • 1
  • Most likely one of the 3 is happening. 1) the identifier is wrong; 2) the element is not loaded instantly and is not found when you try to look for it; 3) the popup is inside a iframe and in that case you need to enter the frame before you can interact with that element (point 2 also applies) – Claudio Batista Dec 13 '22 at 16:39

0 Answers0