WebDriverExtensions

This class provides extension methods from the IWebDriver interface for easier JavaScript execution on the WebDriver.

ExecuteScript

Executes JavaScript in the context of the currently selected frame or window. If the generic type is omitted than this method will not return any result.

driver.ExecuteScript("myJavaScriptMethod();");

LoadJQuery

When JQuerySelector is used the library will detect if the tested page contains the loaded jQuery library and if jQuery is not present, the library will load it before running the selector. jQuery will be loaded from a CDN from this url: https://code.jquery.com/jquery-latest.min.js

In some cases there may be a need to load an alternative version of the library, or to load the library from a different source and for this purpose the LoadJQuery method is available.

Load a different version of the jQuery library from CDN.

driver.LoadJQuery("1.11.1");

LoadSizzle

When SizzleSelector is used the library will detect if the tested page contains the loaded Sizzle library and if Sizzle is not present, the library will load it before running the selector. Sizzle will be loaded from a CDN from this url: https://cdnjs.cloudflare.com/ajax/libs/sizzle/2.0.0/sizzle.min.js

In some cases there may be a need to load an alternative version of the library, or to load the library from a different source and for this purpose the LoadSizzle method is available.

Load a different version of the Sizzle library from CDN.

driver.LoadSizzle("2.3.3");

Last updated

Was this helpful?