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

猜你喜欢

转载自www.cnblogs.com/4wheel/p/9342143.html