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: 2e9d84c3482ff03d44a1625c1bb6a84d0a3ffaf2 $
    • Constructor Detail

      • WCAGUtils

        public WCAGUtils()
    • Method Detail

      • setupWCAGValidation

        public void setupWCAGValidation​(boolean wcag,
                                        String testClassName)
        Parameters:
        wcag - true if WCAG tests must be executed, false otherwise
        testClassName - the PO class name to use for logging and reporting
      • 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 a report file.
        Throws:
        IOException - if the directory creation fails
      • assertWCAGResults

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