Get-ElementText
Gets the text value of an element.
Powershell
Gets the text value of an element. Returns: the text value of an element.
Syntax
Get-ElementText [-sessionId
Parameters
name | description |
---|---|
sessionId | (Optional) The identifier of the session to route the command to. |
elementId | The identifier of the element to query. |
Examples
Find-Element "login" | Get-ElementText
C#
Declaration
System.String OpenQA.Selenium.IWebElement.Text;
Returns:
type | description |
---|---|
System.String | The text of the element |
Examples
element.Text;
Last modified January 1, 0001