Table of Contents

Class Scripts

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

A repository of named JavaScripts which are distributed with Screenplay's Selenium integration.

public static class Scripts
Inheritance
Scripts
Inherited Members

Remarks

Developers who use Screenplay & Selenium and who need to develop their own custom JavaScripts are encouraged to devise their own classes similar to this one. This provides a rapid and type-safe mechanism of retrieving and reusing well-known/predefined JavaScripts.

Properties

ClearLocalStorage

Gets a NamedScript which clears the Local Storage of the browser, for the current domain.

public static NamedScript ClearLocalStorage { get; }

Property Value

NamedScript

GetTheDocumentReadyState

Gets a NamedScriptWithResult<TResult> which gets the value of document.readyState for the current page.

public static NamedScriptWithResult<string> GetTheDocumentReadyState { get; }

Property Value

NamedScriptWithResult<string>

Remarks

You may use this script to determine whether the page has finished loading.

SetElementValue

Gets a NamedScript<T1, T2> which sets the value of a specified HTML element.

public static NamedScript<IWebElement, object> SetElementValue { get; }

Property Value

NamedScript<IWebElement, object>

SetElementValueSimulatedInteractively

Gets a NamedScript<T1, T2> which sets the value of a specified HTML element, simulating setting it interactively.

public static NamedScript<IWebElement, object> SetElementValueSimulatedInteractively { get; }

Property Value

NamedScript<IWebElement, object>