Untitled
unknown
plain_text
3 years ago
724 B
6
Indexable
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import time PATH="C:\Program Files (x86)\chromedriver.exe" driver = webdriver.Chrome(PATH) driver.get("https://www.techwithtim.net") link = driver.find_element_by_link_text("Python Programming") time.sleep(3) link.click() try: element = WebDriverWait(driver, 10).until( EC.presence_of_element_located((By.LINK_TEXT, "Beginner Python Tutorials")) ) element.click() except: driver.quit()
Editor is loading...