SeleniumSharper 1.2.0
dotnet add package SeleniumSharper --version 1.2.0
NuGet\Install-Package SeleniumSharper -Version 1.2.0
<PackageReference Include="SeleniumSharper" Version="1.2.0" />
paket add SeleniumSharper --version 1.2.0
#r "nuget: SeleniumSharper, 1.2.0"
// Install SeleniumSharper as a Cake Addin #addin nuget:?package=SeleniumSharper&version=1.2.0 // Install SeleniumSharper as a Cake Tool #tool nuget:?package=SeleniumSharper&version=1.2.0
SeleniumSharper
SeleniumSharper is a powerful, lightweight tool that makes working with Selenium much easier. By offering a set of useful extensions and tools, it enhances the experience of working with Selenium.
Table of contents
Installation
You should install SeleniumSharper with NuGet:
Install-Package SeleniumSharper
Or via the .NET Core command line interface:
dotnet add package SeleniumSharper
Either commands, from Package Manager Console or .NET Core CLI, will download and install SeleniumSharper and all required dependencies.
Usage
Wait conditions
var title = driver.Wait(30)
.Until(ctx => ctx.Title)
.Satisfies(title => title.Equals("My awesome title"));
WebDriverManager
Here is an example of how to use WebDriverManager
to setup a specific type of driver with a custom configuration:
var webDriverPath = WebDriverManager
.For<ChromeDriver>()
.With(config =>
{
config.VersionResolveStrategy = VersionResolveStrategy.SpecificVersion;
config.Version = "113.0.5672.24";
})
.Setup();
You can also use the default configuration if you don't need to set any custom options:
var webDriverPath = WebDriverManager
.For<ChromeDriver>()
.Setup();
Credits
I would like to give credit to the following resources that have inspired this project.
WebDriverManager.Net
The idea for automatically downloading and installing driver binaries was inspired by the repository WebDriverManager.Net. However, this project uses a slightly different approach by creating a driver manager that returns the instance of the IWebDriver
, making it even easier to work with it.
DotNetSeleniumExtras
The idea for implementing an enhanced methodology to wait for conditions to be satisfied in Selenium was inspired by the repository DotNetSeleniumExtras. Fascinated by the concept, I developed my own implementation. The waiting methods included in this library are designed to resemble a sentence and are capable of accepting Func<>
delegates, thereby increasing their flexibility and variety.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Selenium.Support (>= 4.9.0)
- Selenium.WebDriver (>= 4.9.0)
- SharpCompress (>= 0.33.0)
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.2.0 | 183 | 4/25/2023 |
1.1.0 | 162 | 4/21/2023 |
1.0.0 | 142 | 4/19/2023 |
1.0.0-preview.0 | 82 | 4/18/2023 |