With the Pro tool you can run from the command line rather than through the GUI tool. You must run the tool from within the installation folder so that it can find all of the resource files it requires, otherwise an error will occur.
An example Windows batch file for running the tool from the command line is provided called
CommandLine.bat. This may be found in the folder you installed the tool into (e.g.
C:\Program Files\TotalValidatorTool). A shell script called
commandline.sh is provided for Linux and OS X (for OS X this is in the
Note that the command line is for the use of one person only as the license prevents embedding within an automated system shared by many people, for example as used in continuous integration, or as part of your own service or software. If you are interested in integrating Total Validator into a continuous integration system then check out our Embedded tool.
The following options may be used when running from the command line. If no options are provided then it will attempt to use a default properties file. Note that whenever you use the GUI tool it automatically creates a properties file in the results folder. This is done to help you to translate what you select in the GUI tool into the command line properties to select from the list below.
Detailed descriptions of each option are provided in the Pro tool documentation for the corresponding option.
- -help : displays the list of command line options and exits.
- -properties Path_To_File : Where Path_To_File is properties file containing the command line options. If this option is used then it must be the only one used on the command line.
- -interact : Will automatically launch a browser to display the results and use interactive dialogs where there are problems with the options supplied. Don't use this option if you wish to run without any user interaction (any errors will be displayed on the command line).
- -sslfix : Use this when you need to work around a known SSL bug in Java.
Main tab equivalent options:
- -url URL : Where URL is the starting web page e.g. http://mywebpage.com/index.html
- -file Path_To_File : Where Path_To_File is the starting web page located on local disk e.g. c:\mysite\index.html. If both this and -url are not supplied but -interact is used, then you will be prompted to choose a starting page on disk.
- -pages Pages : Where Pages is the number of pages to check. By default it will only check one page. Set this to zero to check all pages.
- -dtd DTD : Where DTD represents the HTML validation you wish to apply. See below for valid values.
- -accessibility A|AA|AAA|A2|AA2|AAA2|508 : Supply one of the values A|AA|AAA|A2|AA2|AAA2|508 to represent the WAI or Section 508 validation you wish to apply.
- -css 1|2.1|3 : Supply one of the CSS levels for the standard you wish to test against.
- -ignorevendor : Ignore CSS vendor extensions.
- -spellcheck : Perform a spell check.
- -brokenlinks : Check for and report any broken links.
- -level Level : Where Level is the validation level to use. This must have the value: 0 (errors + probable errors + warnings), 1 (errors + probable errors), or 2 (errors only). It defaults to the value 0.
Include tab equivalent options:
- -excludepath Path_To_Exclude : Where Path_To_Exclude is a path within the starting URL to exclude when testing more than one page (must start with a '/'). Regular expressions may be used, and you can use this option more than once.
- -includepath Path_To_Include : where Path_To_Include is a path within the starting URL to include when testing more than one page (must start with a '/'). Regular expressions may be used, and you can use this option more than once.
- -followbelow : Will just follow links below the starting page.
- -followlinks : Will follow all links on the starting page.
- -ignorecase : Ignore case when deciding whether to follow links.
- -userobots : Exclude/include paths specified in robots.txt
- -validateerrors : Validate error pages when HTTP error code is returned.
- -ENNN : Where NNN is the number of an error to suppress on the report. You can use the -E option as many times as you wish on the command line for each error you wish to suppress.
- -PNNN : Where NNN is the number of a probable error to suppress. You can use the -P option as many times as you wish on the command line for each probable error you wish to suppress.
- -WNNN : Where NNN is the number of a warning to suppress on the report. You can use the -W option as many times as you wish on the command line for each warning you wish to suppress.
- -IENNN : Where NNN is the number of an error to include on the report. You can use the -IE option as many times as you wish on the command line for each error you wish to include.
- -IPNNN : Where NNN is the number of an probable error to include. You can use the -IP option as many times as you wish on the command line for each probable error you wish to include.
- -IWNNN : Where NNN is the number of a warning to include. You can use the -IW option as many times as you wish on the command line for each warning you wish to include.
- -depth Depth : Where Depth is the the directory depth below the starting page.
- -stopafterpg Pages : Where Pages is the maximum number of pages with problems to report before stopping.
- -stopafter Problems : Where Problems is the maximum number of errors plus warnings to report before stopping.
Links tab equivalent options:
- -reportredirects : If checking broken links, then all 301/302/303 redirection warnings will be reported.
- -linkmethod DEFAULT|GET|HEAD : The HTTP Method to use when testing links. Defaults to DEFAULT.
- -timeout Seconds : If checking broken links or more than one page, then Seconds is the time to wait before declaring a link broken. This must be a value between 10 and 120. It defaults to 20.
- -concurrency Maximum : If checking broken links or more than one page, then Maximum is the maximum number of links to check simultaneously. This must be a positive integer. Set to 0 to check all links simultaneously. It defaults to 100.
- -lpause MilliSeconds : If concurrency is set to 1, then MilliSeconds is the time to pause in milliseconds before checking each link. This must be an integer, greater than 0.
- -noquery : Will strip off query parameters from links before testing or following them.
- -nosession : Will strip off session ids from links before testing or following them. e.g. http://yourdomain/page.html;session_id
Spell check tab equivalent options:
- -uppercase : Spell check words that are all in upper case. Must appear after -spellcheck
- -mixedcase : Spell check words that are in mixed case. Must appear after -spellcheck
- -wordswithdigits : Spell check words with digits in. Must appear after -spellcheck
- -punctuated : Spell check words surrounded by characters other than quote marks. Must appear after -spellcheck
- -includecode : Spell check words within <samp>, <code>, and <kbd> tags. Must appear after -spellcheck
- -checkattrs : Spell check text in these attributes: alt, title, summary, label, prompt, standby. Must appear after -spellcheck
- -savebadwords : When spell checking save all the misspelt words to the corrections folder.
- -saveforeign : When spell checking save all words from unrecognised languages to the corrections folder.
- -usebritish : Use British instead of American as the default English.
- -ignoresuggestions : When spell checking don't supply any alternative words when a word cannot be found in the dictionary. Must appear after -spellcheck
- -showlangcodes : Display the language codes next to each misspelt word.
- -owndics Paths_To_Files : Where Paths_To_Files is a comma-separated list of paths to one or more supplementary/alternative dictionaries.
- -ignorelangs Language_Codes : Where Language_Codes is a comma-separated list of language codes to ignore.
- -defaultlangcode Language_Code : Where Language_Code is the default to use when a page doesn't specify one.
- -correctionsfolder Path_To_Folder : Where Path_To_Folder is the folder used for correction dictionaries.
- -spellport Port : Where Port is the port the Pro tool listens on for spell check additions to a dictionary. This must be an integer in the range (1-65535). It defaults to 9890.
Network tab equivalent options:
- -ignoreproxy : Ignore any operating system proxy settings e.g. those set in 'internet options' control panel applet in Windows.
- -proxyhost Host : Where Host is the name of the proxy server you need to go through to access the starting web page.
- -proxyport Port : Where Port is the port the proxy server listens on. This must be an integer in the range (1-65535).
- -proxysocks : Use the SOCKS protocol to talk to the proxy server.
- -puser UserName : Where UserName is required to traverse an authenticating proxy server.
- -ppassword Password : Where Password is required to traverse an authenticating proxy server.
- -noproxyfor Hosts : Where Hosts is a comma-separated list of hosts which bypass the proxy server.
- -cookiepolicy ACCEPT_ALL|ACCEPT_SERVER|ACCEPT_SESSION|ACCEPT_NONE : Use this option to specify how you wish to deal with cookies received whilst validating. Defaults to ACCEPT_SERVER.
- -cookie Cookie : Where Cookie is a standard set-cookie HTTP header. This cookie will be treated like a normal cookie received from the server for the starting page and subject to the policies defined above.
- -ppause MilliSeconds : Where MilliSeconds is the time to pause in milliseconds before retrieving each page. This must be an integer, greater than 0.
- -identity identity : Where identity is the name of a user agent as displayed on the Include tab of the Pro tool.
Authentication tab equivalent options:
- -user UserName : Where UserName is required for HTTP protected web pages.
- -password Password : Where Password is required for HTTP protected web pages.
- -interactiveauth : If set (and -interact is set before this option) then display prompts when web/proxy authentication fails
- -actionX Action : Where Action is the value of the 'action' attribute value to match for form submission. X is a number greater than zero to allow more than one form to be specified.
- -actionregexX : Treat the -action option as a regular expression. X is used to match with the correct -action.
- -submitX Name : Where Name is the name of the submit button to use if there is more than one. X is used to match with the correct -action.
- -paramX Name=Value : Where Name is the name of a parameter to submit when sending a form, and Value is its value e.g. '-param userid=julie', or '-param userid=' to send a blank value. X is used to match with the correct -action.
Results tab equivalent options:
- -resultsfolder Path_To_Folder : Where Path_To_Folder is the folder you wish to store the results in. This defaults to the documents folder.
- -uniquereport : Output the results using a unique report name.
- -displaybrowser Browser : The browser you wish to display the results with. This defaults to the default browser. It should be the full browser's path for Linux or Windows, but just the browser's name for OS X.
- -detailsdefault HOVER|SHOW_ALL|HIDE_ALL : The default value for the 'Display issues details' option on the Results. Defaults to HOVER.
- -sortbydefault LINKS|PATH|MOST|LEAST : The default value for the 'Sort by' option on the Results. Defaults to LINKS.
- -hideresults : Do not display the validation results in a browser. If you have -interact set then other interactive dialogs may still appear.
- -showsuccess : Use this option to list pages that had no reported problems.
- -shortreport : Select the 'Short report' checkbox on the results.
- -hidecontent : Select the 'Hide content' checkbox on the results.
Valid values for use with the -dtd option above are listed below. Note that these are case-sensitive:
- "HTML 5.1"
- "XHTML 5.1"
- "HTML 5.1 Polyglot"
- "HTML5 Polyglot"
- "XHTML 1.1"
- "XHTML Basic 1.1"
- "XHTML+ARIA 1.0"
- "XHTML+RDFa 1.1"
- "XHTML+RDFa 1.0"
- "XHTML 1.0 Strict"
- "XHTML 1.0 Transitional"
- "XHTML 1.0 Frameset"
- "XHTML-Print 1.0"
- "XHTML Basic 1.0"
- "XHTML Mobile 1.2"
- "HTML4+ARIA 1.0"
- "HTML4+RDFa 1.1"
- "HTML4+RDFa Lite 1.1"
- "HTML4+RDFa 1.0"
- "HTML 4.01 Strict"
- "HTML 4.01 Transitional"
- "HTML 4.01 Frameset"
- "HTML 4.0 Strict"
- "HTML 4.0 Transitional"
- "HTML 4.0 Frameset"
- "ISO/IEC 15445:2000"
- "HTML 3.2"
- "HTML 2.0"
With the -action, -actionregex, -submit, -param form options you may wish to supply information for more than one form. If so then add a unique number greater than zero to the option name to distinguish between each form.
For example with just one form you can pass the options like this:
-action authenticate/login -param userid=julie -param password=test
With two forms you need to identify which parameters to use with which form action:
-action1 authenticate/login -param1 userid=julie -param1 password=test -action2 purchase -submit2 buy -param2 item=SDCard -param2 type=32GB
In place of a long command line with lots of options as described above, you can place all these options into a properties file instead, and then just use the single
-properties option to refer to this file
Here's an example properties file to help. Note that comments are prefixed with a #, each option must be on its own line, and you must add '=' between properties and their values. Blank lines are ignored.
To help you to create this file, whenever you use the GUI tool it automatically creates a a file called
commandline.props for you in the results folder. This contains all of the command line equivalents of the GUI tool settings you have just used.
If no command line options are provided it will look for a file called
commandline.props in the
- For Windows Vista/7/8/10 the
- For Windows 2000/XP the
- For Linux the
- For OS X the
The location of this folder is also displayed in the 'About' menu of the GUI tool.
As an example the following line will silently check all the pages on a website for compliance against XHTML 1.1, with W3C WCAG 1.0 AAA accessibility, spell checked, also checking for broken links:TotalValidatorCL.exe -url http://www.your_web_site.com/index.html -pages 0 -dtd "XHTML 1.1" -accessibility AAA -spellcheck -brokenlinks
The following example prompts for a single local web page, then check it for compliance against HTML 4.01, with Section 508 accessibility, and automatically displaying the results in a browser at the end:TotalValidatorCL.exe -interact -dtd "HTML 4.01 Transitional" -accessibility 508
The next example tests a local web site for broken links, reports all redirects, but suppresses the reporting of 302 and 303 warnings, and automatically shows the results:TotalValidatorCL.exe -interact -pages 0 -file c:\mysite\index.html -brokenlinks -reportredirects -W302 -W303
To supply the command line options in the default
commandline.props properties file, simply use:
To supply the command line options in your own properties file, use:TotalValidatorCL.exe -properties myprops.props