Get-AlertText

Gets the text displayed on the alert window.

Powershell

Gets the text displayed on the alert window. Returns: the displayed alert window text

Syntax

Get-AlertText [[-sessionId] ] []

Parameters

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

Examples

Get-AlertText

C#

Declaration

OpenQA.Selenium.IAlert::string Text()

Returns:

type description
System.String Gets the text of the alert.

Examples

driver.SwitchTo().Alert().Text();
Last modified January 1, 0001