Set a variable to a value extracted from the database, to a value extracted from the current page (in fact this can be any arithmetic, javascript, or xpath expression).
<set name="a1" value="3"/> <set name="a2" value="3#{a1}"/> <set name="a3" expr="3 * #{a1}"/> <eval expr="33 = #{a2}"/> <eval expr="9 = #{a3}"/> <set name="customerid" expr="//input[@name=customerid]/@name"/>Variable expansion is first performed on global vaiables and then on the javascript of the current HTML page.
dbinsert -- Defines a set of database insertions for a page or response.
Attribute Value(s) Default Value expr An xpath expression - i.e. an arithmetic expression, a javascript expression, or an xpath expression based on element(s) in the current document
CDATA#IMPLIED name The name of the variable to set
CDATA#REQUIRED query An sql database query; the first column of the first row will be used
CDATA#IMPLIED stepid CDATA #IMPLIED value The value to which the variable should be set. Variable expansion is performed, but there is no arithmetic evaluation
CDATA#IMPLIED
( dbinsert ) *
steps -- This element contains all the test steps.
suite -- Define a set of steps which can be "called" from a run element.
with -- Group together a set of steps that use the same page definition.
Top Elements || All Elements || Tree