Table of Contents

Class QuestionMultiQueryBuilder

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

Provides methods to build performable questions for a collection of Selenium elements, which are based upon querying/interrogating values from those elements.

public class QuestionMultiQueryBuilder
Inheritance
QuestionMultiQueryBuilder
Inherited Members

Constructors

QuestionMultiQueryBuilder(ITarget)

Initializes a new instance of the QuestionMultiQueryBuilder class with the specified Selenium elements.

public QuestionMultiQueryBuilder(ITarget elements)

Parameters

elements ITarget

The Selenium elements to be used by the query builder.

Methods

AllOptions()

Gets a performable question which reads all of the available options (whether selected or not) from a collection of <select> elements.

public IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>> AllOptions()

Returns

IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>>

A performable question

Remarks

This question is only valid for <select> elements. For any other type of element, the behaviour is undefined.

Attribute(string)

Gets a performable question which reads the value of the specified attribute from the elements.

public IPerformableWithResult<IReadOnlyList<string>> Attribute(string attributeName)

Parameters

attributeName string

The name of the attribute from which to read the value

Returns

IPerformableWithResult<IReadOnlyList<string>>

A performable question

Clickability()

Gets a performable question which checks the clickability of the elements.

public IPerformableWithResult<IReadOnlyList<bool>> Clickability()

Returns

IPerformableWithResult<IReadOnlyList<bool>>

A performable question

CssProperty(string)

Gets a performable question which reads the value of the specified CSS property from the elements.

public IPerformableWithResult<IReadOnlyList<string>> CssProperty(string propertyName)

Parameters

propertyName string

The name of the CSS property from which to read the value

Returns

IPerformableWithResult<IReadOnlyList<string>>

A performable question

Location()

Gets a performable question which reads the pixel location (top-left corner) of the elements.

public IPerformableWithResult<IReadOnlyList<Point>> Location()

Returns

IPerformableWithResult<IReadOnlyList<Point>>

A performable question

SelectedOptions()

Gets a performable question which reads the selected options from a collection of <select> elements.

public IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>> SelectedOptions()

Returns

IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>>

A performable question

Remarks

This question is only valid for <select> elements. For any other type of element, the behaviour is undefined.

Size()

Gets a performable question which reads the pixel size (width and height) of the elements.

public IPerformableWithResult<IReadOnlyList<Size>> Size()

Returns

IPerformableWithResult<IReadOnlyList<Size>>

A performable question

Text()

Gets a performable question which reads the text content of the elements.

public IPerformableWithResult<IReadOnlyList<string>> Text()

Returns

IPerformableWithResult<IReadOnlyList<string>>

A performable question

UnselectedOptions()

Gets a performable question which reads the unselected options from a collection of <select> elements.

public IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>> UnselectedOptions()

Returns

IPerformableWithResult<IReadOnlyList<IReadOnlyList<Option>>>

A performable question

Remarks

This question is only valid for <select> elements. For any other type of element, the behaviour is undefined.

Value()

Gets a performable question which reads the value of the elements.

public IPerformableWithResult<IReadOnlyList<string>> Value()

Returns

IPerformableWithResult<IReadOnlyList<string>>

A performable question

Visibility()

Gets a performable question which checks the visibility of the elements.

public IPerformableWithResult<IReadOnlyList<bool>> Visibility()

Returns

IPerformableWithResult<IReadOnlyList<bool>>

A performable question