Show sampleTest.xml syntax highlighted
<testcase xmlns="jelly:jameleon">
<test-case-summary>
An example test that fills out variable form fields
and clicks on the apppriate button to submit the form
</test-case-summary>
<test-case-author>Christian Hargraves</test-case-author>
<test-case-level>ACCEPTANCE</test-case-level>
<functional-point-tested>sample form</functional-point-tested>
<application-tested>htmlunit-plugin</application-tested>
<htmlunit-session
baseUrl="file:xdocs/forms/sampleForm.html"
beginSession="true">
<htmlunit-validate
functionId="Validate that the page was successfully loaded"
title="Sample Form Page"
xpath="//form[@name='sample']"/>
<htmlunit-set-text-field
functionId="Enter first name using XPath to locate the text field"
xpath="//form[1]//input[@name='fname']"
value="Mark"/>
<htmlunit-set-text-field
functionId="Enter last name using XPath to locate the text field"
xpath="//form[1]//input[@name='lname']"
value="Smith"/>
<htmlunit-set-radio-button
functionId="Select gender, using the form, fieldName, value and checked attributes"
form="sample"
fieldName="gender"
value="male"
checked="true"
/>
<htmlunit-set-password-field
functionId="Enter the password using the form (XPath this time), fieldName and value attributes"
form="//form[1]"
fieldName="password"
value="some password"
/>
<htmlunit-click
functionId="Click the purple submit button"
xpath="//form[@name='sample']/tr/td[1]/input[@type='button' and @value='Go']"/>
<htmlunit-validate
functionId="Validate that the 'Go Back' button shows up"
xpath="//input[@type='button' and @value='Go Back']"/>
<htmlunit-validate
functionId="Validate that the password shows up"
xpath="//tr/td[text()='Password:']/following-sibling::td[text()='some password']"/>
</htmlunit-session>
</testcase>
See more files for this project here