search

Home  >  Q&A  >  body text

python - selenuim hidden element click

while "pointer" in driver.find_element_by_id("sitbReaderRightPageTurner").get_attribute("style"):
    driver.find_element_by_id("sitbReaderRightPageTurner").click()

第二行运行时出现问题怎么回事?

selenium.common.exceptions.ElementNotVisibleException: Message:
Screenshot: available via screen

怪我咯怪我咯2873 days ago619

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:29:14

    Invisible elements cannot be clicked, of course. You can click them using js, or make them appear and then click them

    reply
    0
  • Cancelreply