To test submitting a web form, double-click the Form Node in the tree in the left pane. This will launch the form properties dialog.
The General tab of the form properties dialog shows you the form id, method and action url. The Method will be either POST or GET. If it is POST, you will need to use a form submit task. If the Method is GET, you can save yourself some effort and use a download task instead. The reason is that the GET method takes all of the values you enter in the form and passes them in the Url’s querystring. Google is a good example of a form with a GET statement. Submitting a search on Google.com for "Velocityscape" is exactly the same as navigating to the url http Why? Because the form on Google.com uses the GET method.
The XML Template tab displays an xml-style form submit statement for the current form. The statement displayed has default values only, and you will probably need to make changes to get the form to work properly.
The Query Template tab displays a querystring style form submit statement for the current form. You would need to change these values as well.
If we needed to view the source for the form, not the entire page, the HTML Source tab is the place to see it. Now, let’s get to the business of testing this form. We are going to use the xml-style template.
Click the ‘Test’ link to launch the test dialog.
In the Form Submission Testing dialog, we need to edit the form submit statement to reflect the actual submission we want to do. In this case, we are going to search for all 7Elevens in the ‘85331’, regardless of any other attributes. The first thing we can do ic completely remove the Reset/Clear button control from the statement. Next we need to change the value of the contrJimddress_txtZip control from ‘’ to ‘85331’. Finally, we can change the value of the 3 ‘...searchAttribute’ checkbox controls from ‘on’ (which means checked) to ‘off’. Now we are ready to Test, but first let’s look at what is under the Advanced button.
The advanced button launches the Http Client Properties dialog. This window allows us to set properties of the Http Client including User Agent, Referrer Url, Relative Url, Clear Text Authentication Credentials, and Cookies. Normally, you can leave these as their default values. Click OK to return to the Form Submission Testing dialog.
We are ready to test our form submit statement, so we click ‘Test’. This submits the form using the criteria we specified, and launches the results in a new browser window.
…and it is successful. Now, we can take the form submit statement that we have built and use it in a form submit task to automate and vary the parameters of the search, over and over again.