Selenium - s50600822/Notes GitHub Wiki

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time


driver = webdriver.Safari()
driver.get("https://youtu.be/AYG6JaoPBpY")
body = driver.find_element_by_tag_name('body')
body.send_keys(Keys.SPACE)



# driver.find_element_by_xpath('//*[@id="skip-button:8"]/span/button')
# wait = WebDriverWait(driver, 20*60)
# element = wait.until(EC.element_to_be_clickable((By.XPATH, "//*[@id='skip-button:6']/span/button")))

# element.click()

time.sleep(120)
driver.close()