Quantcast
Channel: find_element_by_* commands are deprecated in Selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 5

find_element_by_* commands are deprecated in Selenium

$
0
0

When starting the function

def run(driver_path):    driver = webdriver.Chrome(executable_path=driver_path)    driver.get('https://tproger.ru/quiz/real-programmer/')    button = driver.find_element_by_class_name("quiz_button")    button.click()run(driver_path)

I'm getting errors like these:

<ipython-input-27-c5a7960e105f>:6: DeprecationWarning: executable_path has been deprecated, please pass in a Service object  driver = webdriver.Chrome(executable_path=driver_path)<ipython-input-27-c5a7960e105f>:10: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead  button = driver.find_element_by_class_name("quiz_button")

... but I can't understand why.

I'm using WebDriver at the latest version for my Chrome's version. I don't why I get

find_element_by_* commands are deprecated

... when it's in the documentation that the command exists.


Viewing all articles
Browse latest Browse all 5

Trending Articles