Class WCAGUtils


  • public class WCAGUtils
    extends Object
    Helper methods for validating WCAG, not related to a specific Page Object. Also made available to tests classes.
    Since:
    15.2RC1
    Version:
    $Id: 918b0c69210eb16cdb98bf72f344892dfd76e976 $
    • Constructor Detail

      • WCAGUtils

        public WCAGUtils()
    • Method Detail

      • setupWCAGValidation

        public void setupWCAGValidation​(boolean wcag,
                                        String testClassName,
                                        boolean stopOnError)
        Parameters:
        wcag - true if WCAG tests must be executed, false otherwise
        testClassName - the PO class name to use for logging and reporting
        stopOnError - false if WCAG validation should ignore errors, true otherwise.
      • changeWCAGTestMethod

        public void changeWCAGTestMethod​(String testMethodName)
        Change the current WCAG test method for reporting.
        Parameters:
        testMethodName - the test method name to update
      • getWCAGContext

        public WCAGContext getWCAGContext()
        Get the WCAG context for the test suite.
        Returns:
        the WCAG Context
      • endWCAGValidation

        public void endWCAGValidation()
                               throws IOException
        Ends the validation process for WCAG.
        Throws:
        IOException
      • writeWCAGResults

        public void writeWCAGResults()
                              throws IOException
        Writes the WCAG validation results into report files. There are four files: * wcagOverview : overview of the results, contains stats and will always be generated. * wcagIncomplete : list of the results that are Incomplete and need further manual inspection. * wcagWarnings : list of the results that are violations, not failing the build. * wcagFails : list of the results that are violations, failing the build.
        Throws:
        IOException - if the directory creation fails
      • assertWCAGResults

        public void assertWCAGResults()
        Assert that the results of the different WCAG failing checks are all empty.