Axe.Windows is a NuGet package for running automated accessibility tests on Windows® applications.
To get the latest version of the Axe.Windows NuGet package, visit Axe.Windows on NuGet.org.
Create a Config
object using Config.Builder
.
// Create config to specifically target a process
var myConfigBuilder = Config.Builder.ForProcessId(1234);
// Optional: configure to create an A11yTest file
myConfigBuilder.WithOutputFileFormat(OutputFileFormat.A11yTest);
// Optional: configure to output the file to a specific directory (otherwise, current directory will be used)
myConfigBuilder.WithOutputDirectory(".\test-directory");
// Ready to use config
var myConfig = myConfigBuilder.build();
Create a Scanner
object using the ScannerFactory
object with the Config
.
// Create scanner using myConfig
var scanner = ScannerFactory.CreateScanner(myConfig);
Call the Scan
or ScanAsync
method on the Scanner
object, to scan synchronously or asynchronously respectively.
var scanOutput = scanner.Scan(null); // Synchronously scan with default options.
Check the output.
Console.WriteLine("Number of errors found in scan of first top-level window: " + scanOutput.WindowScanOutputs.first().ErrorCount);
For more details and a complete code example, please visit the automation reference page
Axe.Windows also has a command line interface (CLI) to simplify automated testing in build pipelines. Please check out the command line interface readme for more information.
All contributions are welcome! Please read through our guidelines on contributions to this project.
For instructions on how to build the code, please visit building the code.
For an overview of the solution, please visit the solution overview.
Visit the Overview of Axe.Windows page.
Axe.Windows does not collect any telemetry on its own. However, the package does provide telemetric data for use by calling applications. Please see the Telemetry page for more details.
If you believe you have found a security vulnerability in this project, please follow these steps to report it. For more information on how vulnerabilities are disclosed, see Coordinated Vulnerability Disclosure.
Please visit our FAQ section to get answers to common questions.