Brian,
I was able to get a handle on each <tr> tag using what you described,
but it does not seem scriptable. Any ideas? I guess I will try to debug
the source to see if I can figure out why it is not scriptable. What a
pain though.
Thanks for your response.
Bill Manuel
Sun Certified Web Component Developer
Supply Chain Systems
The Kroger Co.
(513) 762-1283
bill.manuel@xxxxxxxxxx
Brian Bonner
<brian.bonner@par
aware.com> To
bill.manuel@xxxxxxxxxx
04/29/2005 05:09 cc
PM users@xxxxxxxxxx
Subject
Re: [cinjug-users] HttpUnit and
javascript
Hey, Bill,
Seems to me you can grab the element by ID (you'll have to add it). We
did something similar to this on a past project.
<tr id="xyz" onclick="takeOverTheWorld();><td>some text</td></tr>
*HTMLPage page;
...
page.getElementWithID*("xyz").getScriptableDelegate().
and so on.
BTW, I may not have this exactly correct, but hopefully that will help you.
Brian
bill.manuel@xxxxxxxxxx wrote:
>
>
>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
>
>
>
>
>---------
>You may unsubscribe from this mailing list
>by sending a blank email addressed to:
>users-unsubscribe@xxxxxxxxxx
>
>--
>Find additional help by sending a blank email
>addressed to:
>users-help@xxxxxxxxxx
>
>
>
---------
You may unsubscribe from this mailing list
by sending a blank email addressed to:
users-unsubscribe@xxxxxxxxxx
--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx
|