Based on your snippet of code, I noticed you have the form elements inside a 
table.  Does your <form> also start inside a table row?  We see this issue a 
lot in some of our legacy pages with malformed HTML.

If the parent HTML element is closed before the form is closed, you have 
malformed HTML.  The most common pitfall I keep seeing is the following:

<table>
    <tr>
        <td>
            <form>
            ...
        </td>(Webtest sees the form end here and any elements below it are not 
seen inside a form, giving the error you mentioned)
   </tr>
    ...
   <tr>
       <td>
            <input type="submit" name="Submit" value="Logon" 
class="contentbutton" onClick="submitForm();"> (Webtest will not see this 
button inside a form)
       </td>
   </tr>
    ...
    <tr>
        <td>
            ...
            </form>
        </td>
    </tr>
</table>

The fix is to move the form outside the table:

<form>
<table>
...
</table>
</form>

Webtest will now correctly identify all form elements.

We have found the following Firefox plugin especially helpful in identifying 
malformed pages: http://users.skynet.be/mgueury/mozilla/

Our basic rule is if the plugin shows a Red X, webtest most likely will fail.


John Spann | Associate Software Engineer

Citrix Online Division
Citrix Systems, Inc.
6500 Hollister Avenue
Goleta, CA 93117 USA
www.citrix.com

Phone: 805.690.3489
Cell: 805.729.0008
Email: [email protected]


On 3/2/09 10:42 AM, "Lisa Crispin" <[email protected]> wrote:

Hi Phumza,
I looked at the html for our buttons and I notice we don't have any that are 
class="contentbutton", ours are class="formbutton" or class="widebutton". I 
have no idea if that makes any difference (I'm not a programmer), just throwing 
that out there. We had problems in the past with buttons not being recognized, 
but not lately.
-- Lisa

On Mon, Mar 2, 2009 at 2:30 AM, Phumza Zuba <[email protected]> wrote:
Hi All
I have a login button inside a form, in a jsp page, but when i direct
webtest to find that button  and use it, it can't fine it.
I thought maybe it was something to do with javascript, but i've
disabled javascript.

here is a code for the button.

<clickButton   description="Clicking the Login button should take us to
Appraisal Console" label="Logon" name="Submit"></clickButton>

and here is the code in the jsp
<tr>
<div class="logonbutton" align="center">
<input type="submit" name="Submit" value="Logon"
class="contentbutton" onClick="submitForm();">
</div>
</tr>

And this is the error message i keep getting.

Error
Message
No button found

Location
/home/phumza/workspace1/WebTesting/tests/TamiTests/batch1.xml (line: 38)

Details
available buttons
In current form: none

Kind Regards
Phumza

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to