WebAutomationKit 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package WebAutomationKit --version 1.0.0
                    
NuGet\Install-Package WebAutomationKit -Version 1.0.0
                    
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="WebAutomationKit" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WebAutomationKit" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WebAutomationKit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WebAutomationKit --version 1.0.0
                    
#r "nuget: WebAutomationKit, 1.0.0"
                    
#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.
#addin nuget:?package=WebAutomationKit&version=1.0.0
                    
Install WebAutomationKit as a Cake Addin
#tool nuget:?package=WebAutomationKit&version=1.0.0
                    
Install WebAutomationKit as a Cake Tool

WebAutomationKit

Lightweight library for fluent Web UI automations with Selenium. Contains a collection of extension methods on top of Selenium types for creating and configuring driver instances and for manipulating elements.

In order to use it, install WebAutomationKit NuGet package together with:

  1. DotNetSeleniumExtras.WaitHelpers (tested with 3.11.0)
  2. Selenium.Support (tested with 3.141.0)
  3. Selenium.WebDriver (tested with 3.141.0)
  4. One or multiple browser drivers (tested with Selenium.Chrome.WebDriver 74.0.0 and Selenium.Firefox.WebDriver 0.24.0)

WebAutomationKit NuGet package instalation will add a project folder (WebAutomatioKit.x.y.z) containing source files. The package doesn't contain/add assemblies to the project.

Samples

Check WebAutomationKit.Tests project for running code.

Configure and create a driver

	var config = new WebDriverConfig
	{
		Name = "firefox",
		CommandTimeoutMin = "1",
		PageLoadTimeoutMs = "30000",
		ElementWaitTimeoutMs = "15000",
		ImplicitElementWaitTimeoutMs = "100",
		Arguments = new [] { "--private" },
		DriverLocation = Utils.GetExecutigAssemblyPath(),
		ScreenshotsFolder = Utils.GetExecutigAssemblyPath(),
    };
	
	var driver = config.CreateDriver();
	
	// ... do something with the driver
	
	driver.Dispose();

Automate a Google search, default driver configuration

	[Test]
	public void Can_automate_google_search()
	{
		string firstResultTitle = null;
		using (var driver = "Chrome".CreateDriver())
		{
			driver.NavigateTo("https://google.com");

			var queryInput = "//input[@name='q']";
			queryInput.ToXPathBy()
				.WaitToBecomeAvailable(driver)
				.FindElement(driver)
				.SendKeys("google" + Keys.Return);

			var resultTitles = "//div[@class='rc']/div[@class='r']/a/h3";
			firstResultTitle = resultTitles.ToXPathBy()
				.WaitToBecomeAvailable(driver)
				.FindElements(driver)
				.First()
				.Text;
		}
		Assert.AreEqual("Google", firstResultTitle);
	}
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.1.1 529 1/4/2021
1.1.0 501 11/30/2020
1.0.4 544 10/7/2020
1.0.3 484 10/7/2020
1.0.2 516 10/6/2020
1.0.1 742 6/1/2019
1.0.0 671 5/18/2019

First revision.