Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

getText method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Gets the text in the modal prompt of the window.alert(), window.confirm(), or window.prompt() type.


{
  "name": "getText",
  "parameters": {},
  "sessionId": "[sessionId]"
}

Syntax

Parameters

name

This is the command you're passing in. In this case, get.

parameters

This is a wrapper object in which you'll embed other objects to be passed to WebDriver as parameters for the command.

url

The elementId as provided by the findElement or findElements commands.

sessionId

The sessionId value of the session you are targeting.

Return value

A JSON response object containing:

  • sessionId
  • status
  • value - a string containing the modal window text

Requirements

Minimum supported client

Windows 10

Minimum supported server

Windows Server Technical Preview

See also

WebDriver for Microsoft Edge

 

 

Show:
© 2015 Microsoft