Table of Contents

Class FindElementBuilder

Namespace
CSF.Screenplay.Selenium.Builders
Assembly
CSF.Screenplay.Selenium.dll

A builder class for finding a single element within a specified target.

public class FindElementBuilder : IGetsPerformableWithResult<SeleniumElement>
Inheritance
FindElementBuilder
Implements
Inherited Members

Remarks

This builder offers two methods to configure the finding of elements:

Constructors

FindElementBuilder(ITarget)

Initializes a new instance of the FindElementsBuilder class with the specified target.

public FindElementBuilder(ITarget target)

Parameters

target ITarget

The target within which elements will be found.

Methods

AndNameIt(string)

Specifies a human-readable name for the collection of elements which are found.

public FindElementBuilder AndNameIt(string name)

Parameters

name string

The name for the collection of elements.

Returns

FindElementBuilder

The current instance of FindElementsBuilder.

WhichMatches(Locator)

Specifies a Locator which should be used to filter the elements which are found.

public FindElementBuilder WhichMatches(Locator locator)

Parameters

locator Locator

The locator to filter the elements.

Returns

FindElementBuilder

The current instance of FindElementsBuilder.

Operators

implicit operator SingleElementPerformableWithResultAdapter<SeleniumElement>(FindElementBuilder)

public static implicit operator SingleElementPerformableWithResultAdapter<SeleniumElement>(FindElementBuilder builder)

Parameters

builder FindElementBuilder

The FindElementBuilder instance to convert.

Returns

SingleElementPerformableWithResultAdapter<SeleniumElement>

A SingleElementPerformableWithResultAdapter<TResult> instance.