FindsByAllAttribute ClassWebDriver
Marks elements to indicate that found elements should match the criteria of all FindsByAttribute on the field or property.
Inheritance Hierarchy

SystemObject
  SystemAttribute
    OpenQA.Selenium.Support.PageObjectsFindsByAllAttribute

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

public sealed class FindsByAllAttribute : Attribute

The FindsByAllAttribute type exposes the following members.

Constructors

  NameDescription
Public methodFindsByAllAttribute
Initializes a new instance of the FindsByAllAttribute class
Top
Properties

  NameDescription
Public propertyTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.)
Top
Methods

  NameDescription
Public methodEquals
Returns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from Attribute.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsDefaultAttribute
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute.)
Public methodMatch
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Remarks

When used with a set of FindsByAttribute, all criteria must be matched to be returned. The criteria are used in sequence according to the Priority property. Note that the behavior when setting multiple FindsByAttribute Priority properties to the same value, or not specifying a Priority value, is undefined.

// Will find the element with the tag name "input" that also has an ID
// attribute matching "elementId".
[FindsByAll]
[FindsBy(How = How.TagName, Using = "input", Priority = 0)]
[FindsBy(How = How.Id, Using = "elementId", Priority = 1)]
public IWebElement thisElement;

See Also

Reference