I know it's just a warning and it's not going to change anything but I don't want it there, I've tried out of stupidity to try and catch the exception but still nothing working. :(
error: C:\Users\raze8\PycharmProjects\Selenium\main.py:5: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome("C:/Selenium/chromedriver_win32/chromedriver.exe") C:\Users\raze8\PycharmProjects\Selenium\main.py:8: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead element = driver.find_element_by_id('downloadButton') C:\Users\raze8\PycharmProjects\Selenium\main.py:10: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead progress_element = driver.find_element_by_class_name('progress-label')
from selenium import webdriver
driver = webdriver.Chrome("C:/Selenium/chromedriver_win32/chromedriver.exe")
driver.get("https://jqueryui.com/resources/demos/progressbar/download.html")
driver.implicitly_wait(5)
element = driver.find_element_by_id('downloadButton')
element.click()
progress_element = driver.find_element_by_class_name('progress-label')
print(f"{progress_element.text}")