ByChained ClassWebDriver
Mechanism used to locate elements within a document using a series of other lookups. This class will find all DOM elements that matches each of the locators in sequence
Inheritance Hierarchy


Namespace: OpenQA.Selenium.Support.PageObjects
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 3.1.0

public class ByChained : By

The ByChained type exposes the following members.


Public methodByChained
Initializes a new instance of the ByChained class with one or more By objects.

Protected propertyDescription
Gets or sets the value of the description for this By class instance.
(Inherited from By.)
Protected propertyFindElementMethod
Gets or sets the method used to find a single element matching specified criteria.
(Inherited from By.)
Protected propertyFindElementsMethod
Gets or sets the method used to find all elements matching specified criteria.
(Inherited from By.)

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from By.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindElement
Find a single element.
(Overrides ByFindElement(ISearchContext).)
Public methodFindElements
Finds many elements
(Overrides ByFindElements(ISearchContext).)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from By.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Writes out a comma separated list of the By objects used in the chain.
(Overrides ByToString.)

The following code will will find all elements that match by2 and appear under an element that matches by1.
driver.findElements(new ByChained(by1, by2))
See Also