2

While finding tag or class in a html using selenium, I am getting the following warning:

<ipython-input-6-f7f8e8a9bbfc>:32: DeprecationWarning: find_elements_by_* commands are deprecated. Please use find_elements() instead
  divTag = driver.find_elements_by_class_name('quote')

But find_elements() is also not working:

InvalidArgumentException: Message: invalid argument: invalid locator
  (Session info: chrome=95.0.4638.69)
Stacktrace:
Backtrace:

Can someone help me in removing the warning?

John Gordon
  • 29,573
  • 7
  • 33
  • 58
Rupal
  • 51
  • 3

1 Answers1

0

Instead of

divTag = driver.find_elements_by_class_name('quote')

Try using

divTag = driver.find_elements(By.CLASS_NAME,'quote')
Prophet
  • 32,350
  • 22
  • 54
  • 79