Table of Contents

Class LazySeleniumElementFormatter

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

A value formatter for Lazy<T> of SeleniumElement.

public class LazySeleniumElementFormatter : IValueFormatter
Inheritance
LazySeleniumElementFormatter
Implements
Inherited Members

Remarks

Importantly this handles errors which may be raised when resolving the element from the Web Driver.

Methods

CanFormat(object)

Gets a value indicating whether this object is suitable for formatting the specified value.

public bool CanFormat(object value)

Parameters

value object

The value to be formatted

Returns

bool

true if this formatter is suitable for formatting the specified value; false if not.

FormatForReport(object)

Gets a formatted string which represents the specified value.

public string FormatForReport(object value)

Parameters

value object

The value to be formatted

Returns

string

A formatted string which represents the specified value.

Remarks

Ensure that the value has been tested with CanFormat(object) before executing this method. The behaviour of this method is undefined for any value for which the can-format method does not return true. It may lead to exceptions or garbage output.