While doing work with selenium many URL get opened and redirected in order to keeping track of URL
current_url method is used. The
current_url method is used to retrieve the URL of the webpage the user is currently accessing. It gives the URL of the current webpage loaded by the driver in selenium.
URL : URL is the abbreviation of Uniform Resource Locator and is defined as the global address of documents and other resources on the World Wide Web, for example, to visit GeeksforGeeks website, you’ll go to the URL https://www.geeksforgeeks.org/ .
It takes no argument.
Return value :
It return the URL in string format.
Note: Here “data:, ” is printed because at that time no webpage is opened.
- Python | SMS Bomber using Selenium
- Exceptions - Selenium Python
- Selenium Python Basics
- Selenium Python Tutorial
- Selenium Python Tricks
- Waits in Selenium Python
- How to install Selenium in Python
- How to take screenshot using Selenium in Python ?
- Python | page_source method in Selenium
- Web Driver Methods in Selenium Python
- Implicit Waits in Selenium Python
- Locator Strategies - Selenium Python
- Special Keys in Selenium Python
- Why do people prefer Selenium with Python?
- Action Chains in Selenium Python
- Interacting with Webpage - Selenium Python
- Writing Tests using Selenium Python
- Like instagram pictures using Selenium | Python
- Search Google Using Python Selenium
- Selenium Python Introduction and Installation
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.