The focus should be on the element that's being used. The firefox
driver calls "element.focus()" before executing a click as well as
firing the mousedown and mouseup events, so that should work as
expected. Are you using the released firefox binaries?
Regards,
Simon
Looking at the code for the Firefox driver[1] we do call focus on the
element before firing the click event, though not blur. We may need to
allow control to flow away from us before continuing with the other
events. I'll try and put a test case together for this.
As an aside, Firefox only reliably fires focus events when its window
is the active one. It's possible that may be causing you trouble,
though I doubt it in this case; it's probably webdriver not doing the
Right Thing :)
Regards,
Simon
Would you mind trying the newest version? I've patched the Firefox and
IE drivers, so hopefully things will now be better.
Regards,
Simon