Hi. You can create events and throw them to your components. I.e. you can write something like that in GWT Test Case method:
Label label = new Label(); CheckClickedClickHandler handler = new CheckClickedClickHandler(); label.addClickHandler(handler); NativeEvent ne = Document.get().createClickEvent(0, 0, 0, 0, 0, false, false, false, false); ClickEvent.fireNativeEvent(ne, label); assertTrue(handler.isCalled()); assertEquals(1, handler.getCallCounter()); CheckClickedClickHandler - handler mock that counts onClick methods. For more info, please refer to the correspondent documentation: http://code.google.com/webtoolkit/doc/1.6/DevGuideTesting.html -- Kind regards, Ignat Alexeyenko. On Tue, Feb 2, 2010 at 4:24 PM, inder sharma <inder.09.here...@gmail.com>wrote: > Hi All !! > > I want to test a UI code developed in GWT.The form I have developed > consists of various GWT components like buttons,text area,text field > etc. There are also listeners added on buttons and fields. > > Now I want to write test cases for the 'UI' of this form using > GWTTestCase.How can I write test cases for this so that data can be > auto filled in form during test case running and listeners added on > components in this form can also be tested? > > Can I achieve this through GWTTestCase or any other tool in GWT to > test UI interactions like listeners etc.? > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.