Class AxeReporter


  • public final class AxeReporter
    extends Object
    Methods for writing, serializing, and to deserialize the Axe scan results.
    • Method Detail

      • setAxeResultString

        public static void setAxeResultString​(String newAxeResult)
        sets the axe result string.
        Parameters:
        newAxeResult - axe result string to be set
      • getAxeResultString

        public static String getAxeResultString()
        gets the results in string format.
        Returns:
        string of the results
      • writeResultsToTextFile

        public static void writeResultsToTextFile​(String outputFilePath,
                                                  Object output)
        Writes a raw object out to a txt file with the specified name.
        Parameters:
        outputFilePath - Object to write. Most useful if you pass in either the Builder.analyze() response or the violations array it contains.
        output - the object to be written to the text file
      • writeResultsToJsonFile

        public static void writeResultsToJsonFile​(String outputFilePath,
                                                  Results output)
        Writes a raw object out to a JSON file with the specified name.
        Parameters:
        outputFilePath - Desired filename, sans extension
        output - Object to write. Most useful if you pass in either the Builder.analyze() response or the violations array it contains.
      • serialize

        public static <T> String serialize​(T obj)
        serialize the object to a string.
        Type Parameters:
        T - so the method can take in an object
        Parameters:
        obj - the object to be turned into a string
        Returns:
        a string value of the object
      • getReadableAxeResults

        public static boolean getReadableAxeResults​(String typeOfScan,
                                                    org.openqa.selenium.WebDriver webDriver,
                                                    List<Rule> scannedResults)
        Parses scanned accessibility results.
        Parameters:
        typeOfScan - Type of scan
        webDriver - Web driver the scan was run on
        scannedResults - The scan results
        Returns:
        True if the scan found anything