How do I get current URL in Selenium Webdriver 2 Python?
Use current_url element for Python 2:
print browser.current_url
For Python 3 and later versions of selenium:
print(driver.current_url)
According to this documentation (a place full of goodies:)):
driver.current_url
or, see official documentation:https://www.selenium.dev/documentation/en/webdriver/browser_manipulation/#get-current-url
Selenium2Library has get_location():
import Selenium2Librarys = Selenium2Library.Selenium2Library()url = s.get_location()