SeleniumExtensionLibrary 1.0.2
See the version list below for details.
dotnet add package SeleniumExtensionLibrary --version 1.0.2
NuGet\Install-Package SeleniumExtensionLibrary -Version 1.0.2
<PackageReference Include="SeleniumExtensionLibrary" Version="1.0.2" />
paket add SeleniumExtensionLibrary --version 1.0.2
#r "nuget: SeleniumExtensionLibrary, 1.0.2"
// Install SeleniumExtensionLibrary as a Cake Addin #addin nuget:?package=SeleniumExtensionLibrary&version=1.0.2 // Install SeleniumExtensionLibrary as a Cake Tool #tool nuget:?package=SeleniumExtensionLibrary&version=1.0.2
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 | Versions 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. |
-
.NETCoreApp 3.1
- Selenium.WebDriver (>= 4.3.0)
- Selenium.WebDriver.ChromeDriver (>= 103.0.5060.13400)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.