FunkyBDD.Selenium.Webdriver.Extensions 1.2.8

Base Class for the Selenium WebDriver to extend the Driver with:
- FindElementFirstOrDefault()
- ImagesEquals()
- GetElementScreenshot()
- NavigateToPath()
- LocalStorage helpers
- GetElementSafe()
- and some other helpers

Install-Package FunkyBDD.Selenium.Webdriver.Extensions -Version 1.2.8
dotnet add package FunkyBDD.Selenium.Webdriver.Extensions --version 1.2.8
<PackageReference Include="FunkyBDD.Selenium.Webdriver.Extensions" Version="1.2.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FunkyBDD.Selenium.Webdriver.Extensions --version 1.2.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Extension for the Selenium IWebDriver

It's also available as NuGet Package

PM> Install-Package FunkyBDD.Selenium.Webdriver.Extensions

This extension equips the Selenium Webdriver with additional functions, which are needed again and again but are not (yet) implemented.

FindElementFirstOrDefault(By by, [int timeout=1])

Advanced FindElement method that returns Null if the element is not found or the 1st element that was found. Optionally the timeout can be set in seconds. Default is 1 second.

ImagesEquals(Bitmap bmp1, Bitmap bmp2)

Compares 2 images and returns true if the images are identical else false. Also it's possible to create and safe a Heathmap of the differences.

GetElementScreenshot(IWebElement element)

Returns a partial screenshot of the passed element as bitmap. Usefull for visual tests against a StyleGuide.

NavigateToPath(string path, [int timeout=5])

Navigates to the relative path based on the current URL.

LocalStorage Helpers

Some helper methods to deal with the browser local storage to set values or kill old values in IE.

LocalStorageSetItem(string key, string value)

LocalStorageGetItem(string key)

LocalStorageLength()

LocalStorageClear()

GetElementSafe(By by, [int Timeout=5])

Returns the searched element if it exists, is visible and clickable. Otherwise returns Null.

SetMobileSize(int width = 750, int height = 1024)

Set the browser size to a mobile size. Please don't use on tests running on Browserstack!

MakeScreenshot(string filename)

Make a screenshot and save it into the folder "SeleniumResults".

ExecuteScript(string script)

Shorthand to execute JavaScript Code

Extension for the Selenium IWebDriver

It's also available as NuGet Package

PM> Install-Package FunkyBDD.Selenium.Webdriver.Extensions

This extension equips the Selenium Webdriver with additional functions, which are needed again and again but are not (yet) implemented.

FindElementFirstOrDefault(By by, [int timeout=1])

Advanced FindElement method that returns Null if the element is not found or the 1st element that was found. Optionally the timeout can be set in seconds. Default is 1 second.

ImagesEquals(Bitmap bmp1, Bitmap bmp2)

Compares 2 images and returns true if the images are identical else false. Also it's possible to create and safe a Heathmap of the differences.

GetElementScreenshot(IWebElement element)

Returns a partial screenshot of the passed element as bitmap. Usefull for visual tests against a StyleGuide.

NavigateToPath(string path, [int timeout=5])

Navigates to the relative path based on the current URL.

LocalStorage Helpers

Some helper methods to deal with the browser local storage to set values or kill old values in IE.

LocalStorageSetItem(string key, string value)

LocalStorageGetItem(string key)

LocalStorageLength()

LocalStorageClear()

GetElementSafe(By by, [int Timeout=5])

Returns the searched element if it exists, is visible and clickable. Otherwise returns Null.

SetMobileSize(int width = 750, int height = 1024)

Set the browser size to a mobile size. Please don't use on tests running on Browserstack!

MakeScreenshot(string filename)

Make a screenshot and save it into the folder "SeleniumResults".

ExecuteScript(string script)

Shorthand to execute JavaScript Code

Release Notes

Fix problem with scrollY on Get ElementScreenshot

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.8 141 11/22/2018
1.2.7 123 11/12/2018
1.2.6 114 11/12/2018
1.2.5 112 11/9/2018
1.2.4 114 11/9/2018
1.2.3 142 11/9/2018
1.2.2 145 11/9/2018
1.2.1 119 11/8/2018
1.2.0 128 11/6/2018
1.0.1 131 10/24/2018
1.0.0 141 10/24/2018