WebAutomationKit 1.1.1

dotnet add package WebAutomationKit --version 1.1.1                
NuGet\Install-Package WebAutomationKit -Version 1.1.1                
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.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WebAutomationKit --version 1.1.1                
#r "nuget: WebAutomationKit, 1.1.1"                
#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 WebAutomationKit as a Cake Addin
#addin nuget:?package=WebAutomationKit&version=1.1.1

// Install WebAutomationKit as a Cake Tool
#tool nuget:?package=WebAutomationKit&version=1.1.1                

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 and 4.0.0-alpha07)
  3. Selenium.WebDriver (tested with 3.141.0 and 4.0.0-alpha07)
  4. One or multiple browser drivers (tested with Selenium.Chrome.WebDriver 85.0.0 and 87.0.0 and Selenium.Firefox.WebDriver 0.27.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 488 1/4/2021
1.1.0 465 11/30/2020
1.0.4 508 10/7/2020
1.0.3 449 10/7/2020
1.0.2 481 10/6/2020
1.0.1 700 6/1/2019
1.0.0 630 5/18/2019

Adds ToCssSelectorBy extension