debugId with UiBinder not working?

75 views
Skip to first unread message

Kay Pac

unread,
May 30, 2014, 7:46:54 PM5/30/14
to google-we...@googlegroups.com
Hello there!  I am trying to use selenium with my GWT app and I have noticed that it uses inappropriate css class selectors to find the widgets. I did some research into this and it seems I need to use 'debugId' attribute in my UiBinder xml template. I have added debugId attributes and have also tried using the ensureDebugId method on @UiField annotated members. Neither of these approaches have resulted in usable IDs, or any IDs, on my widget elements.

Here is my UiBinder template: https://gist.github.com/katernya/d35ea486d50ae45b6995
Here is my LoginViewImpl class https://gist.github.com/katernya/9dbf2aa23cadd73dae24
Yes my UiBinder xml is caled LoginViewImpl.ui.xml

Thanks for any help!  This is with gWT 2.6.1 and Java 1.7 on Windows (embedded jetty instance launched via cargo) with and without super dev mode enabled.

Kay

Jens

unread,
May 30, 2014, 8:26:58 PM5/30/14
to google-we...@googlegroups.com
You must inherit com.google.gwt.user.Debug otherwise UIObject.ensureDebugId() will be compiled out.

-- J.

Thomas Broyer

unread,
May 30, 2014, 8:29:21 PM5/30/14
to google-we...@googlegroups.com
Did you <inherit name="com.google.gwt.debug.Debug"/> ? (see http://stackoverflow.com/a/11847603/116472)
Do you prepend a "gwt-debug-" prefix to your IDs in your Selenium tests to match elements?
Reply all
Reply to author
Forward
0 new messages