Skip to main content

Get Web Element

Command description

Retrieve a specified web element and access its coordinates, dimensions, attributes, source code, and other information. Use Get Related Web Elements to retrieve its parent, children, siblings, or descendants.

For example, you can directly use the following Python expression to obtain relevant data:

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.

Command Input Parameters

input parametersInput parameter typeDescription
Webpage ObjectWebPageGet the elements of this web page
Web ElementstrCaptured web element UID, not its name or ms-rpa-id
Element Wait DurationnumberMaximum time to wait for the element to appear, in seconds

Command Output Parameters

Output parametersOutput parameter typeDescription
Web ElementWebElementRetrieved element object. Reading its coordinate or size properties activates the webpage and brings its browser window to the front.

Type definition reference

tip
  • Runavelo has a powerful type management mechanism that can directly obtain relevant information through objects without resorting to other commands. This mechanism can significantly simplify the process complexity.
  • Install the Runavelo browser extension before using this command.
  • See Capture Web Elements for instructions on capturing elements and editing their attributes.
  • If the required element has not been captured, the AI can call the start_capture_web_element tool.

Example

  • Runavelo obtains the href link in <a href='/xxx'>

  • Other RPA software obtains href links in <a href='/xxx'>

Runavelo lets you access element information directly without additional commands. This reduces the number of intermediate objects and keeps workflows simpler and clearer.

FAQ

See Web Automation FAQ