Table of Contents

Class TargetExtensions

Namespace
CSF.Screenplay.Selenium.Elements
Assembly
CSF.Screenplay.Selenium.dll

Extension methods for ITarget instances.

public static class TargetExtensions
Inheritance
TargetExtensions
Inherited Members

Methods

AllHave(ITarget)

Creates a new QueryPredicatePrototypeBuilder for the specified target, which represents a collection of HTML elements.

public static QueryPredicatePrototypeBuilder AllHave(this ITarget target)

Parameters

target ITarget

The target for which to create the query builder.

Returns

QueryPredicatePrototypeBuilder

A new instance of QueryPredicatePrototypeBuilder.

Remarks

This method is used with the creation of predicates for WaitUntil(Func<IWebDriver, bool>) to wait until every element expsed by the current target instance meets the specified conditions.

The method AreAll(ITarget) is functionally identical to this method; the two overloads are provided just so developers may create a more readable fluent method chain.

AreAll(ITarget)

Creates a new QueryPredicatePrototypeBuilder for the specified target, which represents a collection of HTML elements.

public static QueryPredicatePrototypeBuilder AreAll(this ITarget target)

Parameters

target ITarget

The target for which to create the query builder.

Returns

QueryPredicatePrototypeBuilder

A new instance of QueryPredicatePrototypeBuilder.

Remarks

This method is used with the creation of predicates for WaitUntil(Func<IWebDriver, bool>) to wait until every element expsed by the current target instance meets the specified conditions.

The method AllHave(ITarget) is functionally identical to this method; the two overloads are provided just so developers may create a more readable fluent method chain.

Has(ITarget)

Creates a new QueryPredicatePrototypeBuilder for the specified target, which represents a single HTML element.

public static QueryPredicatePrototypeBuilder Has(this ITarget target)

Parameters

target ITarget

The target for which to create the query builder.

Returns

QueryPredicatePrototypeBuilder

A new instance of QueryPredicatePrototypeBuilder.

Remarks

This method is used with the creation of predicates for WaitUntil(Func<IWebDriver, bool>) to wait until the current target instance meets the specified conditions.

The method Is(ITarget) is functionally identical to this method; the two overloads are provided just so developers may create a more readable fluent method chain.

Is(ITarget)

Creates a new QueryPredicatePrototypeBuilder for the specified target, which represents a single HTML element.

public static QueryPredicatePrototypeBuilder Is(this ITarget target)

Parameters

target ITarget

The target for which to create the query builder.

Returns

QueryPredicatePrototypeBuilder

A new instance of QueryPredicatePrototypeBuilder.

Remarks

This method is used with the creation of predicates for WaitUntil(Func<IWebDriver, bool>) to wait until the current target instance meets the specified conditions.

The method Has(ITarget) is functionally identical to this method; the two overloads are provided just so developers may create a more readable fluent method chain.