How to fetch the current page URL in Selenium?

How to fetch the current page URL in Selenium?

Hello Rhian-lewis,

In order to fetch the current page URL, we can use the getCurrentURL() command.

driver.getCurrentUrl();