VisionAutomationFramework 3.0.0-beta.1
See the version list below for details.
dotnet add package VisionAutomationFramework --version 3.0.0-beta.1
NuGet\Install-Package VisionAutomationFramework -Version 3.0.0-beta.1
<PackageReference Include="VisionAutomationFramework" Version="3.0.0-beta.1" />
<PackageVersion Include="VisionAutomationFramework" Version="3.0.0-beta.1" />
<PackageReference Include="VisionAutomationFramework" />
paket add VisionAutomationFramework --version 3.0.0-beta.1
#r "nuget: VisionAutomationFramework, 3.0.0-beta.1"
#:package VisionAutomationFramework@3.0.0-beta.1
#addin nuget:?package=VisionAutomationFramework&version=3.0.0-beta.1&prerelease
#tool nuget:?package=VisionAutomationFramework&version=3.0.0-beta.1&prerelease
Vision Automation Framework (VAF)
VAF is a fluent test automation framework for .NET on top of Selenium WebDriver. Waiting for the page, for elements to be visible and interactable is handled for you, so tests read like the steps they describe.
3.0.0-beta.1 is a preview. In Visual Studio tick Include prerelease to see it; the stable release is 2.1.0. Upgrading from 2.x: see Migrating from 2.x.
Requirements
- A test project for .NET Framework 4.7.2 (or newer 4.x) or .NET 10
- Any test framework: NUnit 3 or 4, MSTest, xUnit. VAF does not depend on one.
- Google Chrome, Firefox, or Safari on macOS. Selenium Manager downloads the matching browser driver on the first run, no driver package needed.
- This beta is tested with Chrome on Windows. Firefox, and Linux and macOS on .NET 10, are supported by design but not yet tested.
Installation
dotnet add package VisionAutomationFramework --prerelease
Quick start
using NUnit.Framework;
using VisionAutomationFramework;
using VisionAutomationFramework.Browsers;
using VisionAutomationFramework.Extensions;
public class Tests
{
[Test]
public void OpensExampleDomain()
{
var browser = Testing.On<Chrome>();
try
{
browser.LetsNavigateTo("https://example.com/")
.Should().HaveTitle("Example Domain");
}
finally
{
browser.Scope.Driver.Quit();
}
}
}
With MSTest or xUnit the test is the same, only the attributes differ ([TestMethod], [Fact]).
A failed check throws VafAssertionException, which every test framework reports as a failed test:
VisionAutomationFramework.VafAssertionException : Title on active tab isn't correctly populated
Expected: "Wrong title"
But was: "Example Domain"
The full guide is at https://www.visionautomationframework.com/quick-start-guide.
Settings
Each setting is read from the environment variable VAF_<name> first, then from appSettings in
the test project's app.config. Environment variables also work on .NET 10, where app.config often
does not reach the test run, and in CI.
| Setting | Default | Meaning |
|---|---|---|
ElementWaitTimeout |
10 | Seconds to wait for an element |
LoaderWaitTimeout |
60 | Seconds to wait for a loader to disappear |
DownloadDirectory |
c:\mydownloads on Windows, <temp>/vaf-downloads elsewhere |
Where Chrome and Firefox save downloads |
What's new in 3.0
- .NET 10 alongside .NET Framework 4.7.2, with the same API.
- No test framework dependency. Works with NUnit 3 and 4, MSTest and xUnit. Under MSTest the
TestExecutionContext.IsolatedContextworkaround is no longer needed. - Only Selenium as a dependency (Selenium.WebDriver and Selenium.Support 4.45 or newer 4.x; on .NET 10 also System.Configuration.ConfigurationManager, for app.config).
- Settings from environment variables (
VAF_ElementWaitTimeout, …) or app.config, and a newDownloadDirectorysetting. LetsSaveScreenshotTo(directory, fileName)saves a screenshot anywhere and returns the path, so you can attach it in any test framework.LetsTakeScreenshot()still saves it in the NUnit test directory and attaches it to the NUnit result.LetsSelectOptionFromRightClickMenurefuses to send keys when the browser is not the foreground window, instead of typing into another window. Do not run such tests in parallel.
Migrating from 2.x
Most tests recompile unchanged. Check these points:
| 2.x | 3.0 |
|---|---|
| VAF brought NUnit, Newtonsoft.Json and RestSharp into your project | Only Selenium. If your tests use NUnit, Newtonsoft.Json or RestSharp, reference them yourself. |
Failed checks threw NUnit's AssertionException |
They throw VisionAutomationFramework.VafAssertionException. Change catch (AssertionException) in your code. |
LetsTakeScreenshot(TestContext tc, …) with the MSTest v1 TestContext |
var path = browser.LetsSaveScreenshotTo(TestContext.TestResultsDirectory); then TestContext.AddResultFile(path); |
BrowserStack: Testing.On<T>(browserStackOptions), BrowserStackRemoteWebDriver, BrowserStackExtensions, IOSSafari, MobileRemoteDriver, MobileDevice |
Removed (obsolete since 2.1). For a remote grid, implement IBrowserDefinition returning a Selenium RemoteWebDriver. |
Mobile types: MobileAppActions, MobileAppAssertions, ActionsMobileApp<T>, AppScope, IMobileContext, MobileApp, non-generic ButtonActions / ButtonAssertions |
Removed. They could not be used: there was no way to start a mobile session. |
WinFormApplication, InternetExplorer |
Removed (the first was never implemented; Internet Explorer is retired). |
WebElementAssertionMethods in the global namespace |
In VisionAutomationFramework.Extensions. |
MSTest: new NUnit.Framework.Internal.TestExecutionContext.IsolatedContext(); in [TestInitialize] |
Not needed; remove it. |
Features
- Chrome, Firefox and Safari; your own browsers through
IBrowserDefinition - Pages, sections and elements as small classes with one locator each
- Element-specific actions and assertions (
AsButton(),AsTextInputField(),AsLabelText(), …) - Built-in waits and loader handling
- XML test log with an HTML report
Contact
https://www.visionautomationframework.com/contact
License
MIT — see LICENSE.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Selenium.Support (>= 4.45.0 && < 5.0.0)
- Selenium.WebDriver (>= 4.45.0 && < 5.0.0)
-
net10.0
- Selenium.Support (>= 4.45.0 && < 5.0.0)
- Selenium.WebDriver (>= 4.45.0 && < 5.0.0)
- System.Configuration.ConfigurationManager (>= 10.0.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 | |
|---|---|---|---|
| 3.3.0 | 145 | 10/21/2026 | |
| 3.2.0 | 104 | 10/20/2026 | |
| 3.1.1 | 106 | 10/20/2026 | |
| 3.1.0 | 103 | 10/20/2026 | |
| 3.0.0 | 118 | 10/1/2026 | |
| 3.0.0-beta.3 | 73 | 9/30/2026 | |
| 3.0.0-beta.2 | 80 | 9/28/2026 | |
| 3.0.0-beta.1 | 99 | 9/27/2026 | |
| 2.1.0 | 111 | 9/27/2026 | |
| 2.0.30 | 411 | 4/7/2025 | |
| 2.0.29 | 339 | 4/7/2025 | |
| 2.0.28 | 280 | 11/19/2024 | |
| 2.0.27 | 290 | 10/28/2024 | |
| 2.0.24 | 280 | 7/29/2024 | |
| 2.0.23 | 325 | 5/29/2024 | |
| 2.0.22 | 311 | 5/29/2024 | |
| 2.0.21 | 313 | 5/28/2024 | |
| 2.0.20 | 332 | 5/16/2024 | |
| 2.0.19 | 585 | 1/4/2024 | |
| 2.0.18 | 716 | 10/26/2023 |
3.0.0-beta.1: .NET 10 alongside .NET Framework 4.7.2; no test framework dependency (failed checks throw VafAssertionException; works with NUnit 3 and 4, MSTest and xUnit); only Selenium as a dependency; settings from VAF_* environment variables or app.config. Breaking: BrowserStack, the mobile types, WinFormApplication and InternetExplorer are removed; the MSTest v1 screenshot overload is replaced by LetsSaveScreenshotTo. See "Migrating from 2.x" in the README.