0
Q:

how to get the url of the current page in selenium python

driver.current_url
1
print(browser.current_url)
2
# Importing webdriver from selenium 
from selenium import webdriver 
  
# Here chrome webdriver is used 
driver = webdriver.Chrome() 
  
# URL of the website  
url = "https://www.geeksforgeeks.org/"
  
# Opening the URL 
driver.get(url) 
  
# Getting current URL 
get_url = driver.current_url 
  
# Printing the URL 
print(get_url) 
1
print(driver.current_url)
0

New to Communities?

Join the community