tags:

views:

1532

answers:

3

I'm writing a selenium test for a GWT app. It uses the mouseover/ mousedown/mouseup approach to click pushbuttons. It clicks the Login button of my app, which calls up the div containing userid and password entry fields, and that works just fine. It then enters a userid and password, then clicks the Submit button for the login form.

If I run it slowly, I can see the button click, but the request never gets sent to the server (I'm watching the wire).

In fact, if, while the selenium IDE is still open, I manually click the button, the request is not sent. If I then close the selenium IDE and click the button, the request goes through fine.

Anybody seen this one? It seems really strange.

Update:

Firebug shows a script error. Apparently, the selenium script has some conflict with the GWT script. Here's the beginning of the error, but the whole thing is quite lengthy:

[Exception... "'com.google.gwt.core.client.JavaScriptException: (TypeError): result is null fileName: chrome://selenium-ide/content/recorder.js lineNumber: 74 stack: ([object XMLHttpRequest],"POST","http://localhost:8080/login",true)@chrome://selenium-ide/content/recorder.js:74 XPC_SJOW_CallWrapper((function (url, windowName, windowFeatures, replaceFlag) {if (self.openCalled) {return self.originalOpen.call(window, url, windowName, windowFeatures, replaceFlag);} else {self.o

A: 

Maybe you could try clickAt or mouseDownAt, they seem to perform a bit differently.

Petteri Hietavirta
It's not an issue of the button being clicked. It is being clicked, and I know that part is working. It's a failure of the underlying ajax call.
Don Branson
Yea, I see that now with the update.
Petteri Hietavirta
Cool. It's a tricky one. If I figure it out, I'll post an update.
Don Branson
+1  A: 

Okay, I found the answer. It's a little embarrassing, but it provides the answer and it's funny, too. I'll share the answer so that you can avoid the problem, and perhaps have a laugh at my expense. :)

The answer is that you have to compile to OBF instead of PRETTY. All the associated links are listed below. They fully explain the problem, and how to avoid it.

What's funny about this? Well, as I was going through search, I finally hit upon the first link below. Almost immediately, I realized, or at least had a sneaking suspicion, that I had solved this problem before. Sure enough, the original question was posted in October, and I was the poster. So, I got an answer before, and completely forgot. Ah, well. Hope the answer helps someone, and my comic misfortune brightens your day.

http://clearspace.openqa.org/message/50170

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/5d6a9c448a82b916/af62e5877237b107?lnk=raot

http://code.google.com/p/google-web-toolkit/issues/detail?id=2861

Don Branson
A: 

can you help on make click event on my GWT application, the scripts been executed fine but did not click the table cell in order to enable users on my page

Felicia