Find-ElementsById

Search for all elements whose identifier matches the given value.

Powershell

Search for all elements whose identifier attribute matches the given value. Returns: all elements whose identifier attribute matches the given value.

Syntax

Find-ElementsById [-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-ElementsById -id 123456

C#

Declaration

OpenQA.Selenium.Internal.IFindsById::ReadOnlyCollection FindElementsById(string id);

Arguments:

type name description
System.Collections.ObjectModel.ReadOnlyCollection id The id to match.

Returns:

type description
OpenQA.Selenium.IWebElement A collection containing all IWebElements matching the criteria.

Examples

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