Class ByNested
Defines a
Inheritance
Namespace: Legerity
Assembly: Legerity.Core.dll
Syntax
public class ByNested : By
Examples
The following example shows how to find all elements that match inputs that appear under divs, followed by forms.
driver.FindElements(new ByNested(By.TagName("div"), By.TagName("form"), By.TagName("input")));
Constructors
| Improve this Doc View SourceByNested(By[])
Initializes a new instance of the ByNested class.
Declaration
public ByNested(params By[] locators)
Parameters
Type | Name | Description |
---|---|---|
By[] | locators | The locators in nesting sequence to find references of. |
Methods
| Improve this Doc View SourceFindElement(ISearchContext)
Finds the first element matching the criteria.
Declaration
public override IWebElement FindElement(ISearchContext context)
Parameters
Type | Name | Description |
---|---|---|
ISearchContext | context | An OpenQA.Selenium.ISearchContext object to use to search for the elements. |
Returns
Type | Description |
---|---|
IWebElement | The first matching OpenQA.Selenium.IWebElement on the current context. |
FindElements(ISearchContext)
Finds all elements matching the criteria.
Declaration
public override ReadOnlyCollection<IWebElement> FindElements(ISearchContext context)
Parameters
Type | Name | Description |
---|---|---|
ISearchContext | context | An OpenQA.Selenium.ISearchContext object to use to search for the elements. |
Returns
Type | Description |
---|---|
ReadOnlyCollection<IWebElement> | A System.Collections.ObjectModel.ReadOnlyCollection`1 of all OpenQA.Selenium.IWebElement matching the current criteria, or an empty list if nothing matches. |