Python - Selenium - Click on link

By xngo on June 17, 2019

The Python code below will open and then click on Python link. Python link to click

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
python_link = driver.find_element_by_link_text("Python")  # Find Python link.

Here is a video showing the code above in action.

Selenium in action clicking on Python link



About the author

Xuan Ngo is the founder of He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.