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


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

public class ByAll : By

The ByAll type exposes the following members.


Public methodByAll
Initializes a new instance of the ByAll 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 find all elements that match by1 and then all elements that also match by2.
driver.findElements(new ByAll(by1, by2))
This means that the list of elements returned may not be in document order.
See Also