Table of Contents

Class BrowserQuirks

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

Static class which holds known browser quirks information.

public static class BrowserQuirks
Inheritance
BrowserQuirks
Inherited Members

Fields

CannotSetInputTypeDateWithSendKeys

Gets the name of a browser quirk which means that a Web Driver cannot set the value of an <input type="date"> using "Send Keys".

public static readonly string CannotSetInputTypeDateWithSendKeys

Field Value

string

Remarks

Date input fields have patchy support amongst browsers and web drivers. The UI which appears in order to set a date often responds poorly to typing a new date manually. Additionally, the calendar UI which most browsers will render is not built from HTML elements and thus cannot be interacted with in the traditional way, by Web Drivers. Thus, if we cannot 'type' a new date and cannot interact by clicking on the calendar, all that remains is to use a JavaScript workaround to set the date.

NeedsToWaitAfterPageLoad

Gets the name of a browser quirk which means that - after navigation to a different page - the browser must be instructed to wait until the following page document is ready.

public static readonly string NeedsToWaitAfterPageLoad

Field Value

string

Remarks

Most Web Driver implementations, without this quirk, automatically wait for the 'incoming' page (in traditional web document navigation) to be ready before they attempt to interact with it. That is - if the "document ready" event has not yet occurred, they will continue waiting. Some browsers/web drivers (those with this quirk) need to be instructed to wait for that ready-state, or else they are liable to attempt to interact with a page which is not yet fully loaded.

Note that this only applies to traditional web navigation. It does not apply to navigating SPA-type apps.

Methods

GetQuirksData()

Gets hard-coded information about known browser quirks.

public static QuirksData GetQuirksData()

Returns

QuirksData

Quirks data, about the peculiarities of specific browsers.

Remarks

This information ships with CSF.Screenplay.Selenium. It may be overridden by user-supplied configuration, should things change in the future. See the browser quirks reference material for more information.