Open/Get URL using Selenium for Python

Open or Get URL

To open a given URL in the browser window using Selenium for Python, call get() method on the driver object and pass the URL as argument to get() method.



  1. Initialise Chrome Web Driver object as driver.
  2. Get the URL using web driver object.

Python Program

from import Service
from selenium import webdriver

service = Service(executable_path="/usr/local/bin/chromedriver")
with webdriver.Chrome(service=service) as driver:


Open URL using Selenium for Python