Click-AlertButton

Clicks on an alert button.

Powershell

Clicks on an alert button.

Syntax

Click-AlertButton [-sessionId ] [-button] []

Parameters

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

Examples

Click-AlertButton -button "Ok"

C#

Declaration

OpenQA.Selenium.IAlert::SendKeys()

Arguments:

type name description
System.String keysToSend The keystrokes to send.

Examples

driver.SwitchTo().Alert().SendKeys("Ok");