The Python code below will open openwritings.net and then click on Python link.
from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome() driver.get("https://openwritings.net") python_link = driver.find_element_by_link_text("Python") # Find Python link. python_link.click()
Here is a video showing the code above in action.
Reference
- https://selenium-python.readthedocs.io/locating-elements.html