Get-ElementProperty

Gets the value of an element property.

Powershell

Gets the value of an element property. Returns: the value of the property

Syntax

Get-ElementProperty [-sessionId ] [-elementId] [-property] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.
elementId The identifier of the element to query.
property The property name to query.

Examples

Get-ElementProperty 12345 "Text"
Find-Element "login" | Get-ElementProperty "Text"

C#

Declaration

System.String OpenQA.Selenium.IWebElement.GetProperty(string propertyName);

Arguments:

type name description
string propertyName the name of the property to retrieve

Returns:

type description
System.String The property value

Examples

element.GetProperty("name")
Last modified January 1, 0001