AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath'

i got an error while trying to run a robot framework script. Can some one help me to solve the issue. Basically xpath is not working with robot framework.

You need to know how to ask questions to be helped.
At least show the XPATH you have and if possible a public URL and the HTML code you want to select.
If you paste here, with proper code styling, a minimal example of Robot Framework test file, you will have help really quick.
(the time I have spent in writing this, could have been spent in writing the solution for your problem)

1 Like

Thanks for suggestion.


I am trying to write and execute a script for google search input box. I have given xpath as per attached screenshot but got an error unfortunately didn’t find any solution.

Without looking at the documentation of SeleniumLibrary, I suspect the problem is you using xpath:and not xpath=.

xpath= is also given the same error

find_elements_by_xpath has been deprecated and removed from selenium long time ago and from seleniumlibrary those where removed few years ago completely. From this point only, issue feels that you have Old version of SeleniumLibrary installed and newer selenium that do not work together. I’d suggest to re-install your python environment into virtualenv and then verify that all dependencies are correct.

1 Like

Updated selenium Library, it works now
Thank you