This is a list of available tags for HtmlUnit Plug-in. This list of tags is also available in the Jameleon GUI. You can get there by selecting the "Functional Points" tab on the lower-left. All tags, including custom tags and other enabled plug-ins' tags, show up in the GUI.
Tag | Short Description |
---|---|
<htmlunit-click/> | A tag which clicks on an HTML element. |
<htmlunit-navigate/> | A generic navigation tag used to make an HTTP GET request. |
<htmlunit-record-alerts/> | A tag that starts recording alert messages and stores them in the context. |
<htmlunit-session/> | A Session tag for the HtmlUnit plug-in. |
<htmlunit-set-checkbox/> | This tag is used to set or unset checkboxes defined by a given XPath expression. |
<htmlunit-set-file-field/> | A tag which sets a file field to the provided value. |
<htmlunit-set-hidden-field/> | A tag which sets a hidden field to the provided value. |
<htmlunit-set-password-field/> | A tag which sets a password field to the provided value. |
<htmlunit-set-radio-button/> | This tag is used to set or unset checkboxes defined by a given XPath expression. |
<htmlunit-set-select-field/> | This tag is used to select or unselect options in a select field. |
<htmlunit-set-text-area/> | A tag which sets a text area to the provided value. |
<htmlunit-set-text-field/> | A tag which sets a text field to the provided value. |
<htmlunit-validate/> | A generic validate tag used to validate HTML. |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
xpath |
The xpath to locate the element to click on | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
url |
The complete URL to navigate to | true | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
alertsContextName |
The name of the context variable to store the list of collections in. | true | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
enableSslCertCheck | htmlUnitEnableSslCertCheck |
Enable or disable validity checking of SSL certificates. If "false", invalid SSL certs will be accepted. If not set, the default is "true". | false | java.lang.Boolean | |
baseUrl | baseUrl |
The url to use when starting the browser. This can be the entire URL including the path or not, but it must start with the protocol (e.g. http://some.domain.com) | false | java.lang.String | |
beginAt | beginAt |
If set, this would be the path after the protocol and/or domain. (e.g. /some/path/to/a/file.html) | false | java.lang.String | |
enableSslCertCheckPort | htmlUnitEnableSslCertCheckPort |
The port to use to connect to https. Usually leaving it as the default should do. | 443 | false | java.lang.Integer |
application |
The name of the application being run according to the *-TestCaseTag.properties file | false | java.lang.String | ||
organization |
The organization (affiliate or company name) this application will be tested against. | false | java.lang.String | ||
postcondition |
| false | boolean | ||
sessionDelay |
Sets the tag to delay x milliseconds before anything else is executed. | 0 | false | long | |
beginSession |
Starts the applicattion and gets it to the state defined in the $testEnviroment-Applications.properties.
DEFAULTS to | false | boolean |
To use XPath to uncheck a checkbox named cb_1 that exists in a form with the name testform:
<htmlunit-set-checkbox functionId="Uncheck the checkbox named cb_1 field" xpath="//form[@name='testform']/input[@name='cb_1']" checked="false"/>
To use the form and the field name to check a checkbox named cb_1 that exists in a form with the name testform:
<htmlunit-set-checkbox functionId="Check the checkbox named cb_1 field" form="testform" fieldName="cb_1" checked="true"/>
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
checked |
To check/uncheck the given checkbox. | false | java.lang.Boolean | ||
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
To use XPath to uncheck a checkbox named cb_1 that exists in a form with the name testform:
<htmlunit-set-radio-button functionId="Uncheck the radio button named rb_1" xpath="//form[@name='testform']/input[@name='rb_1']" checked="false"/>
To use the form and the field name to check a radio button named rb_1 that exists in a form with the name testform:
<htmlunit-set-radio-button functionId="Check the radio button named rb_1" form="testform" fieldName="rb_1" checked="true"/>
To use the form, field name and value to check a radio button named rb_1 with the value rb_val1 that exists in a form with the name testform:
<htmlunit-set-radio-button functionId="Check the radio button named rb_1" form="testform" fieldName="rb_1" value="rb_val1" checked="true"/>
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
checked |
To check/uncheck the given checkbox. | false | java.lang.Boolean | ||
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
To use XPath to unselect a sf_1 select field option with the value attribute of sfo_1 that exists in a form with the name testform:
<htmlunit-set-select-field functionId="Select the select field option with the value 'sfo_1'" xpath="//form[@name='testform']/select[@name='sf_1']/option[@value='sfo_1']" selected="false"/>
To use the form, field name and option value to select an option with the value sfo_1 that exists in a form with the name testform:
<htmlunit-set-select-field functionId="select the select field option with the value attribute of 'sfo_1'" form="testform" fieldName="sf_1" optionValue="sfo_1" selected="true"/>
To use the form, field name and option text to select an option by it's displayed text Select Me that exists in a form with the name testform:
<htmlunit-set-select-field functionId="select the select field option with the displayed text 'Select Me'" form="testform" fieldName="sf_1" optionText="Select Me" selected="true"/>
To use the form, field name and option text to select the 3rd option that exists in a form with the name testform:
<htmlunit-set-select-field functionId="select the third select field option" form="testform" fieldName="sf_1" optionIndex="2" selected="true"/>
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
optionValue |
The the value of the option's value attribute | false | java.lang.String | ||
optionIndex |
The position of the option to select. The first displayed option would be 1 | -1 | false | int | |
optionText |
The the displayed text of the option's value attribute | false | java.lang.String | ||
xpath |
The xpath that matches the desired option to select. | false | java.lang.String | ||
selected |
The xpath that matches the desired option to select. | true | java.lang.Boolean | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
form |
The identifier of the form. Value indentifiers are, the name, id, index or XPath expression Only the form or xpath attribute can be set at once | false | java.lang.String | ||
fieldName |
The field name in the form. | false | java.lang.String | ||
value |
The value to set the text field to | false | java.lang.String | ||
xpath |
The xpath that matches the desired text field | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |
Take a look at this tag's API docs and source code
for more information.
Attribute Name | Context Name | Description | Default | Required | Type |
---|---|---|---|---|---|
title |
The expected title of the page | false | java.lang.String | ||
textPresent |
The expected text in the page | false | java.lang.String | ||
xpath |
The xpath to evaluate | false | java.lang.String | ||
msg |
The message to display in if a failure occurs | false | java.lang.String | ||
functionId |
The id of this function. This is used in the macro as a short description of the function | true | java.lang.String | ||
breakPoint |
Tells the GUI to stop at this functional point | false | boolean | ||
precondition |
Specifies this is a precondition | false | boolean | ||
postcondition |
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. | false | boolean | ||
expectFailure |
Specifies a failure is expected. | false | boolean | ||
expectException |
Specifies an exception is expected. | false | boolean | ||
functionDelay |
The delay time to use at the end of each functional point | -1 | false | long |