SeleniumExtensionLibrary 1.0.5

dotnet add package SeleniumExtensionLibrary --version 1.0.5
NuGet\Install-Package SeleniumExtensionLibrary -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SeleniumExtensionLibrary" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SeleniumExtensionLibrary --version 1.0.5
#r "nuget: SeleniumExtensionLibrary, 1.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SeleniumExtensionLibrary as a Cake Addin
#addin nuget:?package=SeleniumExtensionLibrary&version=1.0.5

// Install SeleniumExtensionLibrary as a Cake Tool
#tool nuget:?package=SeleniumExtensionLibrary&version=1.0.5

SeleniumExtensionLibrary

SeleniumExtension based on Selenium 4.3 Chrome driver 103.0.5060.13400

using library

SeleniumConfig config = new SeleniumConfig();
ISeleniumExecutor executor = new SeleniumExecutor();
executor.SetConfig(config);

all fields with comments extension methods will work when add using namespace

using SeleniumExtensionLibrary;

available methods

IWebDriver driver = executor.InitDriver()
string sessionId = executor.InitDriverAndSaveToSessionManager();

init driver or init driver and place to session manager

to work with driver need get IWebDriver element, InitDriver() method return this and GetDriverBySessionId(string sessionId) also return IWebDriver element

executor.GetDriverBySessionId("<SESSION_ID>")

to close driver and exit chromedriver.exe process use CloseDriver(IWebDriver driver) or CloseDriverBySessionId(string sessionId) methods

executor.CloseDriverBySessionId("<SESSION_ID>");
executor.CloseDriver(driver);

extension methods

methods work with IWebDriver object

driver.GoToUrl("https://google.com");
driver.Navigate().GoToUrl("https://google.com")

method work like standart method

driver.FindElementOrGetNull(By locator);

method work like standart FindElement method but return null if element not finded

driver.FindElementOrGetNullWithTimeout(By locator, int timeoutSeconds);

extension to previous method but element try find with used time, standart timeout can set in config for example: driver.FindElementOrGetNullWithTimeout(By.Class("someClass"), 5); elemnt try find in page for 5 seconds, if element not finded return null

methods work with IWebElement object

element.FillField(string value, FillRule rule);

method replace standart SendKeys() but using rules

FillRule.Fast //work like standart send keys
FillRule.Normal //between chars using Task.Delay(10 ms)
FillRule.Long //between chars using Task.Delay(50 ms)
FillRule.Random //between chars using Task.Delay(between 10 - 50 ms)
element.ClearAndFillField(string value, FillRule rule);

method like previous but before fill field use element.Clear() method

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 336 12/9/2022
1.0.4 289 12/9/2022
1.0.3 330 12/2/2022
1.0.2 427 9/23/2022
1.0.1 432 9/23/2022
1.0.0 409 7/21/2022