I'm writing a selenium code, but when I want to play a video clicking on the Play button, I realized that I can't play it. I used XPATH
, CLASS_NAME
, CSS_SELECTOR
but it failed.
I used this line of code:
start_video = driver.find_element(By.XPATH,"//button[@type='button' and @aria-label='Play' ]").click()
shows Nosuchelementexception.
HTML of the element:
<button class="ytp-large-play-button ytp-button ytp-large-play-button-red-bg" aria-label="Play"></button>
Any help?