0

I'm writing a test using selenium with python. I'm using PyDev extension in Eclipse.

I'm testing a user management system and of course there is a method to test access permissions. Since there are a lot of links in our system and in some cases may all links be unavailable for the user, there would be a lot of alerts to let the user know about not having permission to access.

Unfortunately, FireFox closes the browser after facing some continuous alerts and the test will exit.

I want to prevent FireFox from this type of behavior and handle alerts by self. I don't want to use that check-box on the FireFox's alert boxes that says "Prevent..."; I need these alerts and I check existence of an alert in order to test the functionality of the system.

That would be great if anyone knows a way to do it for all web-drivers in code, not manually in the browser; since this code will run in some other browsers and some other servers.

4

0 回答 0