Python 3 Selenium Automation Script to Find Button on Webpage by Text & Click it Full Project For Beginners




Make sure you have Selenium installed using



pip install selenium



And also download the WebDriver for your web browser :

Chrome :
Firefox :
Safari :



# import module
from selenium import webdriver
import time

# Create the webdriver object. Here the
# chromedriver is present in the driver
# folder of the root directory.
driver = webdriver.Chrome(r"./driver/chromedriver")

# get

# Maximize the window and let code stall
# for 10s to properly maximise the window.

# Obtain button by link text and click.
button = driver.find_element_by_link_text("Sign In")

Leave a Reply