So I tracked down the issue.  It was one of those stupid things, but
just in case someone else is getting the same issues:

The important thing is where you put the ensureDebugId method.  I was
calling it when the widget was being added to a container, not
necessarily when it was being populated with values.  In the cases
where it wasn't working, the object would be changed dynamically and
hadn't been updated yet when I was calling the ensureDebugId method.

Stephen


On Jul 29, 3:59 pm, The Question <[email protected]> wrote:
> I, like many others am trying to use Selenium to test my GWT
> application.  Unlike the others, though, I am having a much harder
> time using theensureDebugId(String) method.
>
> What is funny is that I am succeeding in setting the ID in some places
> but not in others.  My gwt.xml file includes the requisite
> statement:
>
>  <inherits name="com.google.gwt.user.Debug"/>,
>
> However, the following code doesn't set the ID of the TabPanel or the
> widget:
>
>         TabPanel tabPanel = new TabPanel();
>         tabPanel.ensureDebugId("main-menu");
>         widget.ensureDebugId(widget.getName() + "-button");
>         tabPanel.add(widget, widget.getName());
>
> There is a lot more going on in my application than what is listed
> here, but I do not set IDs explicitly anywhere in my code.  After
> compiling the application there are no IDs that exist in the generated
> source despite these statements in my code.
>
> However, for the following code:
>
>         RootPanel MENU_PANEL = RootPanel.get("gwtMainMenu");
>         menuPanel.ensureDebugId("menu-panel");
>
> The ID 'gwt-debug-menu-panel' appears as expected.
>
> I haven't tried definitively, but I think the same thing happens with
> setID().  So this may not be a problem only related toensureDebugId
> (String), but the way I set my IDs in general.  However, I am looking
> to use theensureDebugIdmethod--not the setID() when I create IDs for
> Selenium.
>
> Why the 'work-sometimes' behaviour?  Is there an order that I should
> be worried about?
> Any help would be appreciated...
>
> Stephen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to