Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

The AccChecker API

The AccChecker API supports automated testing. After screening an application by using manual testing with the AccChecker GUI, you can write automated tests that incorporate the message and suppression logs created with the GUI tool.

The following code example demonstrates how to use the AccChecker API to test tabbing functionality in the Windows Firewall control panel application.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AccCheck.Logging;
public class TestCases : TestBase
    public void AccessibilityTestCase()
        //  get our user interface ready for AccChecker
        //  AccChecker's class representing verifications that you can run
        AccCheck.Verification.VerificationManager vm = new AccCheck.Verification.VerificationManager();
        //  create a console logger to get output in the console
        ConsoleLogger consoleLogger = new ConsoleLogger();
        //  add AccChecker's Console Logger
        //  disable all verifications
        // enable the ones we want to run
        //  run it against the firewall
        //  check if the verification failed by looking at the logger
        if (consoleLogger.ErrorCount > 0)
            Console.WriteLine("Test failed!");
            Console.WriteLine("Error count = " + consoleLogger.ErrorCount);
        // cleanup our user interface

Related topics

UI Accessibility Checker



Ajouts de la communauté

© 2015 Microsoft