Saturday, June 4, 2011

Re: Simulating button click in GWT Unit test?

> Shouldn't this test be an acceptance test run by something like selenium,
> instead of using GWTTestCase?

It's also run by Selenium under different circumstances (that's why it
has an idea).

So you know how to do the above test?

On Jun 4, 4:06 pm, Magno Machado <magn...@gmail.com> wrote:
> Shouldn't this test be an acceptance test run by something like selenium,
> instead of using GWTTestCase?
>
>
>
>
>
>
>
>
>
> On Sat, Jun 4, 2011 at 10:51 AM, Ed <post2edb...@gmail.com> wrote:
> > I have to simulate a button click on a button that is created in a GWT
> > Unit test (that extends from GWTTestCase).
> > However, it's almost impossible to get a direct reference to the
> > button to simulate the click directly on the button event.
>
> > The button, however, has a unique id through the HTML tag id property.
> > Is there away to find the button element and then simulate the button
> > click in a GWT Unit test ?
>
> > I am not sure how to do this.
> > Finding the element through "Document.get().getElementById("bla")" I
> > don't think works as RootPanel.get() doesn't contain the expected
> > application elements but rather GWT Junit stuff...? :(
> > And then how to simulate a button click on the found element :(...
>
> > Please some advice?
> > - Ed
>
> > --
> > 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-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Magno Machado Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment