Code Search for Developers
 
 
  

sampleTest.xml from Jameleon at Krugle


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

Jameleon

Jameleon is a data-driven automated testing tool that is easily extensible via plug-ins. Features of applications are automated in Java and tied together independently in XML, creating self-documenting automated test cases.

Project homepage: http://sourceforge.net/projects/jameleon
Programming language(s): Java,XML
License: other

  fineGrainedTests.xml
  htmlunit-click-success.xml
  htmlunit-custom-tag-test.xml
  htmlunit-navigate-success.xml
  htmlunit-record-alerts.xml
  htmlunit-set-checkbox-success.xml
  htmlunit-set-file-field-success.xml
  htmlunit-set-hidden-field-success.xml
  htmlunit-set-password-field-success.xml
  htmlunit-set-radio-button-success.xml
  htmlunit-set-select-field-success.xml
  htmlunit-set-text-area-success.xml
  htmlunit-set-text-field-success.xml
  htmlunit-test-on-load.xml
  htmlunit-validate-textPresent-success.xml
  htmlunit-validate-title-success.xml
  htmlunit-validate-xpath-success.xml
  sampleTest.xml