Mozmill uses an element hierarchy for wrapping and manipulating DOM elements. The base class is called MozMillElement. All element types inherit from this class. Mozmill provides some basic subclasses that implement additional functionality. For example, the MozMillRadio class adds some methods for dealing specifically with radio buttons. The MozMillDropList class adds methods for dealing with drop lists (such as selects and menulists). While these provided subclasses provide the basic functionality needed to interact with the most common DOM elements, it may not be enough for your needs. When this is the case you need to extend the default hierarchy.
Creating a new Element Subclass
The first thing you need to do is actually create the subclass. In this example we will create a new subclass for a 'link' element.