Find Element by ID

Last modified: June 18, 2025

Description

Find a web element by ID. Occurrence lets you specify which element to fetch from the result-list, starting at 1 for the first element (defaults to the first element).

Usage

Provide the ID of the element you want to find. This action will find all elements from the DOM with that ID and save them as a result-list. If you want, to get another element instead of the first element of the result-list, provide an index as input for the Occurrence.
Optionally restrict the search to a specified SearchContext element.

Input Parameters

NameDatatypeRequiredDescription
IDStringyesThe ID of the element you want to get
Search ContextWebElementnoLimit the search to the given WebElement
OccurrenceIntegernoIndex of the result-list value you want to get (defaults to the first element)

Return Value

NameDatatypeDescription
ElementWebElementThe wanted WebElement