I just tried Selenium RC's fire_event method to see if it did a better
job that click did. To wit:
fire_event( 'css=a.queryButton', 'click')
And again no joy.
Dig it. I turned on ruby-debug and put a breakpoint in my selenium
test. Then I put a breakpoint right before that fire_event call. So
when the breakpoint is hit, the Selenium-controlled browser (Safari in
this case) is just sitting there ready to accept input.
At this point I manually click the hyperlink and voilá, the lowpro
behavior is invoked as expected. This tells me that lowpro (and
prototype) are operating in the Selenium-driven Safari instance
(good). But whether I use selenium's click or fire_event method the
result is the same. It is as if the hyperlink's default behavior is
being invoked (skipping the lowpro-applied behavior). Turns out my
anchor's got an empty href so the default behavior just reloads the
current page--which of course is not what is wanted.
Is there no reliable way to automate end-to-end, in-the-browser,
testing of DHTML apps? I'd try Watir, but it's IE-only-ness is a
problem.