Table of Contents

CSF.Screenplay.Selenium Extension

The Selenium extension allows Actors to control web browsers using Selenium WebDriver technology. The control of web browsers in this manner is the origin of the Screenplay pattern, in which it was an improvement and thorough refactoring of the older Page Object pattern.

Core contents of this extension

Like many extensions, the Selenium extension provides:

Many of the Performables provided by this extension operate in the format "Actor performs X vaction upon Y element". A core benefit of Screenplay (over Page Object pattern) is the separation of the functionality (the logic of the interaction) and the UI elements (the target of the interaction). This improves reusability and composability.

Additional contents

The types listed above are the core of the Selenium plugin, but there's more available.

  • This extension integrates with the Browser Quirks feature of CSF.Extensions.WebDriver. That allows it to provide integrated workarounds for the quirks of some browsers. These workarounds are amongst the Tasks noted above.
  • This extension provides a Color struct which provides a cross-browser way of describing sRGB color and testing for equality.
  • For occasions on which JavaScript must be sent to the browser, this extension provides Named Script classes which offer a type-safe mechanism to refer to those scripts from .NET code.
  • If the default wait timeout of 5 seconds is unsuitable, the ability UseADefaultWaitTime may be used to specify a default timeout suitable for your use-case.