Skip to content

Commit

Permalink
facebook: add conditional check if button exists
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Oct 14, 2024
1 parent 7f4fad4 commit 70a4359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion automon/integrations/facebook/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 70a4359

Please sign in to comment.