Class NamedFilterElementsBuilder
- Namespace
- CSF.Screenplay.Selenium.Builders
- Assembly
- CSF.Screenplay.Selenium.dll
A builder class which permits specifying an optional name for the collection of elements which match an element filter.
public class NamedFilterElementsBuilder : IGetsPerformableWithResult<SeleniumElementCollection>
- Inheritance
-
NamedFilterElementsBuilder
- Implements
- Inherited Members
Constructors
NamedFilterElementsBuilder(SeleniumElementCollection, ISpecificationFunction<SeleniumElement>)
Initializes a new instance of the NamedFilterElementsBuilder class.
public NamedFilterElementsBuilder(SeleniumElementCollection elements, ISpecificationFunction<SeleniumElement> specification)
Parameters
elementsSeleniumElementCollectionThe elements to filter
specificationISpecificationFunction<SeleniumElement>The specification by which to filter the elements
Exceptions
- ArgumentNullException
If any parameter is null.
Methods
AndNameThem(string)
Specifies a human-readable name for the collection of elements which are found matching the specification.
public IPerformableWithResult<SeleniumElementCollection> AndNameThem(string resultsName)
Parameters
resultsNamestringA short, descriptive, human-readable name for the collection of matching elements.
Returns
- IPerformableWithResult<SeleniumElementCollection>
A performable question
Exceptions
- ArgumentNullException
If
resultsNameis null.
Operators
implicit operator FilterElements(NamedFilterElementsBuilder)
Converts a NamedFilterElementsBuilder to a FilterElements question.
public static implicit operator FilterElements(NamedFilterElementsBuilder builder)
Parameters
builderNamedFilterElementsBuilderThe builder to convert.
Returns
Remarks
This conversion is only used when the AndNameThem(string) function is not used (the name is not specified).