BROWSER

XmlTestSuite will emulate certain browser characteristics for the http interface to the server and when executing javascript. This element specifies the attributes of the XmlTestSuite web browser.

If the browser element is not defined, the browser will assume default settings. These defaults will be suitable for most purposes. The most useful settings are likely to be:


1. Allowed Content

EMPTY

2. Attributes

AttributeValue(s) Default Value
acceptcookies CDATA #IMPLIED
acceptgzip Specifies whether a WebClient will be initialized to accept GZIP encoded responses. The default is true. CDATA #IMPLIED
applicationcodename CDATA #IMPLIED
applicationname CDATA #IMPLIED
applicationversion CDATA #IMPLIED
autoredirect Determines whether HttpUnit should automatically follow page redirect requests (status 3xx). By default, this is true in order to simulate normal browser operation. CDATA #IMPLIED
autorefresh Specifies whether HttpUnit should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page. Setting this to true can cause an infinite loop on pages that refresh themselves. CDATA #IMPLIED
checkcontentlength Specifies whether HttpUnit should throw an exception when the content length of a message does not match its actual received length. Defaults to false. CDATA #IMPLIED
defaultcharacterset Sets the default character set for pages which do not specify one and for requests created without HTML sources. By default, HttpUnit uses the HTTP default encoding, iso-8859-1. CDATA #IMPLIED
defaultcontenttype Sets the default content type for pages which do not specify one. CDATA #IMPLIED
exceptionsthrownonerrorstatus CDATA #IMPLIED
exceptionsthrownonscripterror Determines whether script errors result in exceptions or warning messages. CDATA #IMPLIED
imagestreatedasalttext If true, tells XmlTestSuite to treat images with alt attributes as though they were the text value of that attribute in all searches and displays. The default is false (image text is generally ignored). CDATA #IMPLIED
logginghttpheaders If true, tells HttpUnit to log HTTP headers to system output. The default is false. CDATA #IMPLIED
matchesignorecase If true, text matches in methods such as {@link HTMLSegment#getLinkWith} are case insensitive. The default is true (matches ignore case). CDATA #IMPLIED
parametervaluesvalidated If true, tells XmlTestSuite to throw an exception on any attempt to set a form parameter to a value which could not be set via the browser. The default is true (parameters are validated). With this option disabled will not only not be checked for correctness, its parameter submission order will not be guaranteed, and changing parameters will not trigger Javascript onChange / onClick events. CDATA #IMPLIED
parser The default is the neko parser (recommended).

If you want to ensure that the HTML is completely valis HTML, or you think there may be an error in the HTML which isn't highlighted by setting the warnings flag, set this to 'tidy'.

It can be set explicitely for all pages (see parserWarningsEnabled) or for a specific request (see fetch).

With tidy, if you use frames and validate frame urls, you will need to specify full pathnames (e.g. from / downwards) rather than relative urls.

neko   |  tidy
neko
parserwarningsenabled If true, tells the parser to display warning messages. The default is false (warnings are not shown). This is a global setting. It can be set explicitely for each server response (see fetch. CDATA #IMPLIED
platform CDATA #IMPLIED
postincludescharset Determines whether a normal POST request will include the character set in the content-type header. The default is to include it; however, some older servlet engines (most notably Tomcat 3.1) get confused when they see it. CDATA #IMPLIED
redirectdelay Sets the delay, in milliseconds, before a redirect request is issued. This may be necessary if the server under some cases where the server performs asynchronous processing which must be completed before the new request can be handled properly, and is taking advantage of slower processing by most user agents. It almost always indicates an error in the server design, and therefore the default delay is zero. CDATA #IMPLIED
screenheight Screen height for javascript CDATA #IMPLIED
screenwidth Screen width for javascript CDATA #IMPLIED
scriptingenabled Default is true with the Niko HTML parser CDATA #IMPLIED
useragent The default is 'Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+HttpUnitTest' CDATA #IMPLIED

3. Content Declaration

Empty

4. Parent Elements

testspec   -- The root element of a xml test script.

Top Elements || All Elements || Tree


test DTD