users
[Top] [All Lists]

HttpUnit and javascript

To: users@xxxxxxxxxx
Subject: HttpUnit and javascript
From: bill.manuel@xxxxxxxxxx
Date: Fri, 29 Apr 2005 16:27:26 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm



All,
      I'm trying to do some web page testing using HttpUnit.  I am having
trouble calling some javascript methods on my page in my test.  I am trying
to call the onclick event on a table row :
      <tr onclick="takeOverTheWorld();><td>some text</td></tr>

In HttpUnit, it seems pretty easy to get a handle on the table (WebTable)
and each individual cell.  Once you have either the table or a cell in the
table you are able to call
object.getScriptableElement().doEvent("onclick").  This would work fine if
I put the onclick on each individual <td> tag.  UGHHH.  That would repeat
for every cell in the row.  Does anyone know how to get a reference to a
<tr> and then call the doEvent() method.  I've been digging through this
for a while with no success.

Thanks in advance for any help you can provide.

Bill Manuel




<Prev in Thread] Current Thread [Next in Thread>