def wrapper(self, *args, **kwargs): "Wrapper." result = fun(self, *args, **kwargs) selenium_utils.handle_alert(self._driver, accept=True) return result