Hi Julien,

Thanks for your response.
I've tried that earlier. But, it seemed that the test of clicking the
element worked, but it didn't go to the next page.
My code looked like this:

clickElementByXPath("/html/body/d...@id='group']/d...@id='mainarea']/div[2]/fo...@id='myForm']/tab...@id='myTable]/tbody/tr[2]/td[1]");
assertTextPresent("I'm on the next page");

And it fails on the second line.
junit.framework.AssertionFailedError: Expected text not found in current
page: [I'm on the next page]
Page content was: ...... << showing that I'm still on the first page >>

Do you have any other idea?

Regards,
Francisca


________________________________

Hi,

Try clickElementByXPath("//tab...@id='myTable']//td[text()='something']");

(The XPath may need some improvement)

Regards,

Julien


________________________________
De : Francisca Todikromo <francisca.todikr...@gm...>
À : jwebunit-us...@li...
Envoyé le : Mer 9 Décembre 2009, 17 h 07 min 37 s
Objet : [JWebUnit-users] how to simulate onclick

Hi,

I have a table on my webpage with an onclick action in the tabledata.
I can only go to the next page by clicking on this table data.
How can I simulate the click on this element with JWebUnit?

The HTML looks like this:

<table id="myTable">
<td onclick="doSomething()'">something</td>
</table>

TIA.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to