Parsing and Identification |
Do not open this page with FrontPage or any other HTML editor because they automatically change this document. Use a simple texteditor instead.
Parsing nonconforming Forms
<form action="data2html.asp" name='ValidForm'>
<!-- begin form ValidForm
-->
<input type=text name=Fonts value=Verdana>
<input type=password name=nonOfYorBiz >
<form action="ThisActionIsInvalid" name='BadForm'>
<!-- Ignore -->
<input type=submit value="SubmitButton" name="submit">
</form> <!--
end ValidForm -->
<input type=image src="box5.gif"
name="Netscape ignores this button"> <!-- IExplorer downloads
picture -->
</form>
IExplorer recognizes form controls outside the form context. Therefore, only IExplorer
will download the picture 'box5.gif'. Fortunatly, a formsubmit with this button is not
supported by browsers.
The form with the name 'BadForm' doesn't exist. It will be ignored by browsers.
Netscape will ignore this line because it's outside the |
Build 820:
Recording and replaying isn't corresponding to browser's behavior.
Identifying Forms 1
If the 'form tag itselft does not define the 'name'
attribute we have to examine the form controls in order to find a submit button
which we use for indentification. If we find a button of type 'submit' we'll
have to use its 'value' attribute for the identification of the form. (Of
course, the 'value' attribute must not be the empty string).
If the first
found button is of type=img, we'll use its 'alt' attribute to identify the
form.
<form action="/"
method="get">
<input type=hidden name=zak
value=cat>
<input type="image"
src="box5.gif" name="Ok" alt="Box5">
<input type="submit
value=Ratamahatta name=Ramadan>
</form>
Results should be:
Record WebPageSubmit("Box5", FormBox5001, ""). This is the first found submit button.
since Build 810 ok
The 'form' tag doesn't define the 'name' attribute. The first submit button is of type 'image', has got the 'alt' attribute which is unfortunately empty. Therefore, we've got to continue to find another submit button.
<form action="/htmlparser" method=get>
<input
name="Favourite actor" value ="Ed O'Neil">
<input type= image src="box5.gif"
alt="">
<input type=submit
value=Send name=Sendbutton>
</form>
since Build 820 ok
Forms without any identifying attributes have to be assigned an automatic generated identification.
<form action="/data2html.asp">
<input type="text"
name="Synonym" value="Acronym">
<input
type= "image"
src="box5.gif">
<input type="image"
src="box5.gif">
</form>
Results:
Record something like WebPageSubmit("box5", FORM000, "", 3)
since Build 620 ok