0

I'm using selenium to click on images and copy their keywords. However, when I choose an image, a modal windows appears (as shown in the image)

I'm trying to get the text using driver.find_element_by_xpath, but none of the elements on the modal dialog are available. Selenium can't find any of them. Although, the elements on the back of the page (behind the modal dialog) are fine. The problem is that the elements on the modal dialog are not there.

Any help is appreciated!

  • 1
    Most likely that modal popup located inside an iframe, so you need to [switch to that iframe](https://stackoverflow.com/questions/7534622/selecting-an-iframe-using-python-selenium) before searching for elements – Andersson Sep 08 '18 at 18:22
  • Share html and your code – Sers Sep 08 '18 at 20:23
  • @Andersson I got it by switching to the appropriate iframe. Thanks for the help. Greatly appreciate it! – Enes Berkay Sep 08 '18 at 22:05
  • No need, I solved it by choosing the appropriate iframe. Thanks anyway! @sers – Enes Berkay Sep 08 '18 at 22:05

0 Answers0