Wicket
  1. Wicket
  2. WICKET-1638

Wickets unique IDs cause problems for automated testing

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None

      Description

      Wickets unique markup IDs cause problems writing automated tests.

      They should be changed so that the first instance of a component with an ID of "foo" on a page would have a generated ID of "foo", the second would be "foo2" and so on. This would make the IDs consistent enough that they could be used for testing.

      See the following discussion for more info.

      http://www.nabble.com/Wickets-unique-IDs-cause-problems-for-Selenium-td17267339.html

        Activity

        Hide
        Igor Vaynberg added a comment -

        agreed, for now i am closing this because WICKET-1830 provides testing support. john, feel free to reopen if WICKET-1830 does not work for you

        Show
        Igor Vaynberg added a comment - agreed, for now i am closing this because WICKET-1830 provides testing support. john, feel free to reopen if WICKET-1830 does not work for you
        Hide
        Martin Grigorov added a comment -

        See WICKET-1830.

        Maybe this resolves this ticket.

        Show
        Martin Grigorov added a comment - See WICKET-1830 . Maybe this resolves this ticket.
        Hide
        Igor Vaynberg added a comment -

        the provided patch is not the greatest.

        first it touches too many things
        second it uses a hashmap which is pretty expensive to serlialize/store

        when one of the core devs finds time to work on this it will be done, or of course someone can provide a better patch.

        Show
        Igor Vaynberg added a comment - the provided patch is not the greatest. first it touches too many things second it uses a hashmap which is pretty expensive to serlialize/store when one of the core devs finds time to work on this it will be done, or of course someone can provide a better patch.
        Hide
        Asgaut Mjølne added a comment -

        Is this patch planned for any release?

        Show
        Asgaut Mjølne added a comment - Is this patch planned for any release?
        Hide
        John Ray added a comment -

        Here's an SVN patch that will generate unique but consistent IDs. I also changed all of the other code that used the Page classes AutoIndex to use the new id generation so that things like check box values will be consistent.

        Show
        John Ray added a comment - Here's an SVN patch that will generate unique but consistent IDs. I also changed all of the other code that used the Page classes AutoIndex to use the new id generation so that things like check box values will be consistent.

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            John Ray
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development