py+selenium 报错NameError: name 'NoSuchElementException' is not defined【已解决】

 报错:NameError: name 'NoSuchElementException' is not defined

 如图

解决方法:

  头部加一句:from selenium.common.exceptions import NoSuchElementException 可解决

  

 

 

参考:https://stackoverflow.com/questions/19200497/python-selenium-webscraping-nosuchelementexception-not-recognized

posted @ 2018-07-20 16:21  怪盗积德  阅读(2587)  评论(0编辑  收藏  举报