1.NoSuchElementException:没有找到元素
2.NoSuchFrameException:没有找到iframe
3.NoSuchWindowException:没找到窗口句柄handle
4.NoSuchAttributeException:属性错误
5.NoAlertPresentException:没找到alert弹出框
6.lementNotVisibleException:元素不可见
7.ElementNotSelectableException:元素没有被选中
8.TimeoutException:查找元素超时
1 try:
2     element = driver.find_element("id", "blog_nav_newpostxx")
3 except NoSuchElementException as msg:
4     print u"查找元素异常%s"%msg
5 
6 # 点击该元素 
7 else:
8     element.click()

 

相关文章:

  • 2022-12-23
  • 2022-03-02
  • 2021-04-22
  • 2021-05-13
  • 2021-08-13
  • 2021-09-04
  • 2021-10-22
猜你喜欢
  • 2021-08-08
  • 2021-05-02
  • 2022-02-14
  • 2021-12-06
相关资源
相似解决方案