#441 Anchor onclick-Event is not fired

closed-invalid
Wolfgang Fahl
None
5
2012-09-12
2010-07-06
Muetze303
No

I'm using JSF and Tobago in my Frontend.
Tobago generates me the following anchor:
<a href="javascript:;" onclick="Tobago.reloadComponent2(this, 'main:menu-panel','main:_composed_administration', {});"
id="main:_composed_administration"
name="main:_composed_administration"
>Administration</a>

In my UnitTest I have the following code:

WebLink link = response.getLinkWithID("main:_composed_administration");
link.click();
response = conversation.getCurrentPage();

I would expect that the onclick-Event is fired but it isn't.

Discussion

  • Wolfgang Fahl
    Wolfgang Fahl
    2012-09-12

    Dear httpunit user!

    Thank you for your bug report. We appreciate the time and effort you are putting into this.

    Please supply a testcase with the expected result for the bug report that you are asking a solution for and we'll look into implementing it. For a start you might want to get the trunk version from the subversion repository (see https://sourceforge.net/svn/?group_id=6550\)
    and have a look at the source code of some of the more than 700 JUnit based testcase in there.

    If you do not use or have subversion tool you can still directly browse our test cases via:
    http://httpunit.svn.sourceforge.net/viewvc/httpunit/trunk/httpunit/test/com/meterware/httpunit/
    Looking into one or more of the Junit Java source files
    should give you a clue on what a proper testcase for httpunit looks like, often you will probably only have to "clone" an existing testcase and modify it slightly to your needs.

    When you are ready you might want to attach the testcase (and if you already have started implementing a solution for it it also the actual code) to the patch section of the sourceforge.net tracker for patches of the httpunit project at
    https://sourceforge.net/tracker/?atid=306550&group_id=6550&func=browse.

    The main communication about further details of the development is via the httpunit developer mailinglist. You are most welcome to sign up via
    https://lists.sourceforge.net/lists/listinfo/httpunit-develop

    Yours
    The httpunit developer team

    (Russell, Wolfgang, Mark, Patrick and Tim as of 2008-04)

     
  • Wolfgang Fahl
    Wolfgang Fahl
    2012-09-12

    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> closed-invalid
     
  • Wolfgang Fahl
    Wolfgang Fahl
    2012-09-12

    Dear Muetze 303,

    thank you for your bug report.
    httpunit's javascript support is too poor for handling bigger JavaScript frameowrks like JSF, Tobago or most Ajax frameworks.

    If you'd like a specific javascript function to be added please supply a (small!) Junit test case for the specific function and we might be able to add support for it.

    Yours
    Wolfgang