Get-Url

Retrieve the URL of the current page.

Powershell

Retrieve the URL of the current page. Returns: the current url.

Syntax

Get-Url [[-sessionId] ] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.

Examples

Get-Url

C#

Declaration

System.String OpenQA.Selenium.IWebDriver.Url;

Returns:

type description
System.String The URL the browser is currently displaying.

Examples

driver.Url;