Class TextMultiQueryBuilder
- Namespace
- CSF.Screenplay.Selenium.Builders
- Assembly
- CSF.Screenplay.Selenium.dll
Builder type for a performable that gets a collection of text values.
public class TextMultiQueryBuilder : IGetsPerformableWithResult<IReadOnlyList<string>>
- Inheritance
-
TextMultiQueryBuilder
- Implements
- Inherited Members
Remarks
The purpose of this builder is to enable or disable the trimming of whitespace characters at the beginning or end of the returned text.
Constructors
TextMultiQueryBuilder(ITarget)
Initializes a new instance of the TextMultiQueryBuilder class.
public TextMultiQueryBuilder(ITarget elements)
Parameters
elementsITargetThe target elements to query.
Methods
WithoutTrimmingWhitespace()
Configures the performable to disable the trimming of whitespace characters at the beginning or end of the returned text.
public TextMultiQueryBuilder WithoutTrimmingWhitespace()
Returns
- TextMultiQueryBuilder
The current instance of the builder, so calls may be chained.
Remarks
Trimming of whitespace at the beginning/end of text is enabled by default. This is because some browsers (Safari) include whitespace at the beginning/end of text read from the browser, which isn't visible to the end user. This is typically the space which is inherent in the markup, but which browsers ignore when actually displaying content.
Trimming it by default ensures that Screenplay reproduces functionality reliably cross-browser. If this causes an issue and you would like the leading/trailing whitespace included in the result then use this method. Note that you may see different results in browsers which include leading/trailing whitespace anyway.