How to get the current URL on a page in Selenium Java

asked 11 months ago

To get the current URL of the webpage, we can use getCurrentUrl() function in the Selenium Webdriver

Example:

driver.getCurrentUrl();
System.out.println(driver.getCurrentUrl());

 

Categories