As others mentioned, you should use find_element()
or find_elements()
instead of find_element_by_*()
or find_elements_by_*()
.
I wrote the regex pattern to replace the deprecated methods to new ones, so try this if you need.
# from - e.g. find_element_by_id("test")find_element(s?)_by_([a-z_]+)\((.*)# to - e.g. find_element(By.ID, "test")find_element$1(By.\U$2\E, $3
Note: you need the import line to use the new methods
from selenium.webdriver.common.by import By