I'm trying to use selenium with Python to click a button on an HTML web page.Whenever I run the code, I get the following error:
'chromedriver' executable needs to be in PATH
I'm trying to click the "Play" button on this website: https://podcasts.apple.com/us/podcast/python-at-the-us-federal-election-commission/id979020229?i=1000522628049
Code:
driver = webdriver.Chrome(executable_path="C:/path/to/chromedriver")
time.sleep(3)
driver.get('https://podcasts.apple.com/us/podcast/python-at-the-us-federal-election-commission/id979020229?i=1000522628049')
button = driver.find_element(By.XPATH, '//*[@id="ember99"]/div/div/section/div[1]/div[1]/div/div/button')
button.click()