Search Results for

    Show / Hide Table of Contents

    Class ByNested

    Defines a locator that can be used to find elements using a sequence of locators that are continuously nested until the final locator is run.

    Inheritance
    System.Object
    ByNested
    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 Source

    ByNested(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 Source

    FindElement(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.

    | Improve this Doc View Source

    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.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps