Webtest WebTest GitHub Home

Core Step setInputField

Description

Provides the ability to update text-oriented input fields in HTML forms (supports input fields of type text and password as well as textareas).

Parameters

value
Required? yes
The value to use when setting the field of interest.
description
Required? no
The description of this test step.
fieldIndex
Required? no, default is the first field found that matches criteria
The index of the field of interest (starting at 0) if more than one field matches criteria. Ignored if htmlId or xpath is used.
forLabel
Required? yes/no
The text of the label field associated with the input field of interest. One of forLabel, htmlId, name, or xpath is required.
formName
Required? no, default is the last form selected using 'selectForm', otherwise searches all forms
The name of the form containing the field of interest. Ignored if htmlId is used.
htmlId
Required? yes/no
The id of the input field of interest. One of forLabel, htmlId, name, or xpath is required.
name
Required? yes/no
The name of the input field of interest. One of forLabel, htmlId, name, or xpath is required.
save
Required? no
A shorthand: save='prefixName' is the same as savePrefix='prefixName' saveResponse='true'.
savePrefix
Required? no, default is the 'savePrefix' parameter as specified in <config>.
A name prefix can be specified for making a permanent copy of received responses. A unique number and the file extension (depending on the MIME-Type) will be appended. The resultpath attribute of the <config> element is used for determining the location of the saved result.
saveResponse
Required? no
Whether to make a permanent copy of received responses. Overrides the default value set in the <config> element.
xpath
Required? yes/no
The xpath of the input field of interest. One of forLabel, htmlId, name, or xpath is required.

Inline Text

The inline text is all the text between the start tag ( <setInputField> ) and the end tag ( </setInputField> ), including blanks, tabs or newlines. Using a pair of start/end tags ( <setInputField> </setInputField> ) has not the same behavior than the seemingly equivalent empty element tag ( <setInputField/> ).

Required? no
An alternative to the attribute value for e.g. large TextAreas.