Use current_url element for Python 2:
print browser.current_url
For Python 3 and later versions of selenium:
print(driver.current_url)
More Related Contents:
- How to sleep Selenium WebDriver in Python for milliseconds
- Running Selenium Webdriver with a proxy in Python
- How can I download a file on a click event using selenium?
- Python Selenium accessing HTML source
- Message: Element could not be scrolled into view while trying to click on an option within a dropdown menu through Selenium
- Log into gmail using Selenium in Python
- Select -> option abstraction
- How to handle elements inside Shadow DOM from Selenium
- How to set the timeout of ‘driver.get’ for python selenium 3.8.0?
- in selenium web driver how to choose the correct iframe
- selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities with Firefox 46 through Selenium
- How to set Selenium Python WebDriver default timeout?
- Turning off logging in Selenium (from Python)
- selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH with GeckoDriver Selenium Firefox
- Python/Selenium incognito/private mode
- Mouse scroll wheel with selenium webdriver, on element without scrollbar?
- Selenium on MAC, Message: ‘chromedriver’ executable may have wrong permissions
- Get all child elements
- How to get past a cookie agreement page using Python and Selenium?
- Is there a way to perform a mouseover (hover over an element) using Selenium and Python bindings?
- Logic Operators in WebDriverWait Expected Conditions
- ElementNotInteractableException: Message: element not interactable error sending text in search field using Selenium Python
- How to find element by part of its id name in selenium with python
- selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities with GeckoDriver, Selenium and Firefox
- Chrome browser initiated through ChromeDriver gets detected
- WebDriverException: Service U:/Scraping/chromedriver.exe unexpectedly exited. Status code was: 1 while working with Chrome and Python
- selenium.common.exceptions.ElementNotVisibleException: Message: element not visible while trying to access an element with Python + Selenium
- Selenium can’t open a second page
- What is unittest in selenium Python?
- selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver.exe while opening chrome browser