From 70a4359388170d070463a730524266aba73925bb Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Mon, 14 Oct 2024 18:58:24 +0800 Subject: [PATCH] facebook: add conditional check if button exists --- automon/integrations/facebook/groups.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/automon/integrations/facebook/groups.py b/automon/integrations/facebook/groups.py index 571f6fc1..bee84bc3 100644 --- a/automon/integrations/facebook/groups.py +++ b/automon/integrations/facebook/groups.py @@ -42,7 +42,10 @@ def close_login_popup(self): value='[aria-label="Close"]', by=self._browser.by.CSS_SELECTOR, ) - button[0].click() + + if button: + button[0].click() + logger.debug(button) except Exception as error: logger.error(error)