Package com.deque.html.axecore.selenium
Class AxeReporter
- java.lang.Object
-
- com.deque.html.axecore.selenium.AxeReporter
-
public final class AxeReporter extends Object
Methods for writing, serializing, and to deserialize the Axe scan results.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAxeResultString()gets the results in string format.static booleangetReadableAxeResults(String typeOfScan, org.openqa.selenium.WebDriver webDriver, List<Rule> scannedResults)Parses scanned accessibility results.static <T> Stringserialize(T obj)serialize the object to a string.static voidsetAxeResultString(String newAxeResult)sets the axe result string.static voidwriteResultsToJsonFile(String outputFilePath, Results output)Writes a raw object out to a JSON file with the specified name.static voidwriteResultsToTextFile(String outputFilePath, Object output)Writes a raw object out to a txt file with the specified name.
-
-
-
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 extensionoutput- 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 scanwebDriver- Web driver the scan was run onscannedResults- The scan results- Returns:
- True if the scan found anything
-
-