Search code examples
pythonselenium-webdriverfindelement

Does the selenium méthode find_element Can only work with id


I can't find use other identification in vscode or pycharm like classes or tagname

I wanna know if the méthode find_element Can use only id or i don't know the updates


Solution

  • find_element can be used with parameters of xpath. Additionally, there are alternative wordings (on docs) that can be used to find it by id, or full xpath, etc. To sum it up, any of them will work if you use the docs and write the correct syntax.