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

Question:

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

Asked By: Ahmed Nasri

||

Answers:

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.

Answered By: Jonathan