Find-ElementById

Search for a element whose identifier matches the given value.

Powershell

Search for element whose identifier attribute matches the given value. Returns: the first element whose identifier attribute matches the given value.

Syntax

Find-ElementById [-sessionId ] [-id] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.
id The indentifier of the element to search.

Examples

Find-ElementById -id 123456

C#

Declaration

OpenQA.Selenium.Internal.IFindsById::IWebElement FindElementById(string id);

Arguments:

type name description
System.String id The id to match.

Returns:

type description
OpenQA.Selenium.IWebElement The first IWebElement matching the criteria

Examples

driver.FindElementById(id);
Last modified January 1, 0001