Skip to main content

Get Web Element Property

Command description

Get a property value from the web element's JavaScript HTMLElement.

Command Input Parameters

input parametersInput parameter typeDescription
Webpage ObjectWebPage
Web ElementWebElement or str (captured element UID, not element name, not ms-rpa-id)Select a captured element or one returned by Get Web Element, Get Similar Web Elements, or Get Related Web Elements
Property NamestrName of the JavaScript HTMLElement property to read
Element Wait DurationnumberMaximum time to wait for the element to appear, in seconds

Command Output Parameters

Output parametersOutput parameter typeDescription
Property Valueany

Type definition reference

Read common WebElement properties directly

The following Python expressions provide direct access to commonly used properties.

Python expressionDescription
webElement.innerTextinnerText of the JavaScript HTMLElement
webElement.hrefhref of the JavaScript HTMLElement
webElement.srcsrc of the JavaScript HTMLElement
webElement.textContenttextContent of the JavaScript HTMLElement
webElement.valuevalue of the JavaScript HTMLElement
webElement.checkedchecked of the JavaScript HTMLElement
webElement.selectedselected of the JavaScript HTMLElement
webElement.leftPhysical-pixel distance from the left edge of the screen to the element's left edge; reading it activates the corresponding webpage and brings its browser window to the front
webElement.topPhysical-pixel distance from the top edge of the screen to the element's top edge; reading it activates the corresponding webpage and brings its browser window to the front
webElement.rightPhysical-pixel distance from the left edge of the screen to the element's right edge; reading it activates the corresponding webpage and brings its browser window to the front
webElement.bottomPhysical-pixel distance from the top of the screen to the bottom edge of the element; reading it activates the corresponding webpage and brings its browser window to the front
webElement.widthElement width in physical pixels; reading it activates the corresponding webpage and brings its browser window to the front
webElement.heightElement height in physical pixels; reading it activates the corresponding webpage and brings its browser window to the front

For other webElement properties, refer to the WebElement class definition.

tip
  • Install the Runavelo browser extension before using this command.
  • See Capture Web Elements for instructions on capturing elements and editing their attributes.

FAQ

See Web Automation FAQ