[Python] Switching to Iframe with rotating ID Selenium

Discussão em 'Python' iniciado por Stack, Abril 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to access the login iframe from https://www.steelmarketupdate.com/. Previously I was able to access this via XPATH

    client.switch_to.frame(client.find_element(By.XPATH, "/html/body/div[6]/div/iframe"))


    However this is no longer working. I found the length of all iframe elements to be 6, and I am unable to access any of these even via the index location. How can I switch to this frame?

    Continue reading...

Compartilhe esta Página