This approach works for me manually: using brower.switch_to_alert() and then alert.accept(). Does this not work when you run the test?