From the thread below:
Keenan said this:
"On a related thread.
I'm noticing that when 'click' or 'clickAndWaiting' a url in the sub window [that will load a url into the subwindow] it seems to be double submitting it to the server. Is anyone else noticing this?" I also noticed this. In my situation, we have a link that can be clicked to delete something from the database.
For example:
watching the traffic with webscarab, I can see the first click event go through. This performs the desired action. Then, the second event is fired causing an error since that personQueryId no longer exists.
If I modify the selenium-browserbot.js code to only fire one event, most of the time, the clickAndWait will still work (in firefox version 1.07), as in the above case. Other times, like when performing a clickAndWait on a login screen (which is button, not simply a link), it won't work. There I need the two events.
Can anybody offer any explanation for this, or a solution/workaround?
I believe the code in question is:
// Trigger the click event.
triggerMouseEvent(element, 'click', true); // In FireFox < 1.0 Final, and Mozilla <= 1.7.3, just sending the
click event is enough. // But in newer versions, we need to do it ourselves. var needsProgrammaticClick = (geckoVersion > '20041025'); // Perform the link action if preventDefault was set. if (needsProgrammaticClick && !preventDefault) { // Try the element itself, as well as it's parent - this handles clicking images inside links. if (element.href) { this.currentWindow.location.href = ""> } else if (element.parentNode.href) { this.currentWindow.location.href = ""> } } Thanks,
Jayson
------------------------------------------------------------------------------ |
_______________________________________________ Selenium-devel mailing list Selenium-devel@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel