为了账号安全,请及时绑定邮箱和手机立即绑定

硒元素不可见异常

硒元素不可见异常

皈依舞 2019-10-17 11:15:44
我的任务是编写一个解析器以单击网站上的一个按钮,但我只能单击其中一个按钮而遇到问题。以下代码适用于除一个按钮之外的所有按钮。这是html:http: //pastebin.com/6dLF5ru8这是源html:http: //pastebin.com/XhsedGLbpython代码: driver = webdriver.Firefox()   ... el = driver.find_element_by_id("-spel-nba") actions.move_to_element(el) actions.sleep(.1) actions.click() actions.perform()我收到此错误。ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with根据赛富尔,我刚刚尝试等待相同的元素不可见异常:wait = WebDriverWait(driver, 10)wait.until(EC.presence_of_element_located((By.XPATH, "//input[contains(@id,'spsel')][@value='nba']"))).click()
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 433 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信