I suggest in the used profile, the property for the displaying of alerts is different. Firefox 4: Changed alert behaviour?
When the webdriver-instance is open look at: about:config --> prompts.tab_modal.enabled.
With loading/setting the profile from outside you may change the behavior to your preferred settings.