4.3 Useful Utilities
There is a number of useful utilities in WAchecker you can use when
writing tests and possibly when defining test sets. Here is short
overview of some of the available modules:
wachecker.util
- Set of miscellaneous small utilities, most of which should be present
in any standard programming language library.
wachecker.exception
- Defines WAchecker exceptions. You should catch exceptions in your
tests and raise WAchecker exceptions instead of the original exception
if the original exception cannot be handled.
wachecker.document
- Representation of an (X)HTML document and its nodes, including
functions for walking over the document. This is also the place where
(X)HTML documents get parsed.
wachecker.location
- Everything related to URLs and page caching.
wachecker.css
- Simple CSS2 parser. It is far from being perfect, but since no Python
CSS2 parsing library is known to the author, something had to be
written for the purpose of checking Web accessibility. The module
contains a CSS2 parser and node matcher.