Table of Contents

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

elements SeleniumElementCollection

The elements to filter

specification ISpecificationFunction<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

resultsName string

A short, descriptive, human-readable name for the collection of matching elements.

Returns

IPerformableWithResult<SeleniumElementCollection>

A performable question

Exceptions

ArgumentNullException

If resultsName is null.

Operators

implicit operator FilterElements(NamedFilterElementsBuilder)

Converts a NamedFilterElementsBuilder to a FilterElements question.

public static implicit operator FilterElements(NamedFilterElementsBuilder builder)

Parameters

builder NamedFilterElementsBuilder

The builder to convert.

Returns

FilterElements

Remarks

This conversion is only used when the AndNameThem(string) function is not used (the name is not specified).