From c36c2491a1a6ff4e2d08f4aba8b40b0fabc21125 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Thu, 26 Sep 2024 04:48:24 +0800 Subject: [PATCH] selenium: don't raise when missing webdriver path --- automon/integrations/seleniumWrapper/browser.py | 2 -- automon/integrations/seleniumWrapper/webdriver_chrome.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/automon/integrations/seleniumWrapper/browser.py b/automon/integrations/seleniumWrapper/browser.py index bcf2c678..11fe9159 100644 --- a/automon/integrations/seleniumWrapper/browser.py +++ b/automon/integrations/seleniumWrapper/browser.py @@ -809,8 +809,6 @@ def run(self) -> bool: return run except Exception as exception: logger.error(f'webdriver :: run :: failed :: {exception=}') - raise Exception(f'webdriver :: run :: failed :: {exception=}') - return False def save_cookies_for_current_url(self) -> bool: diff --git a/automon/integrations/seleniumWrapper/webdriver_chrome.py b/automon/integrations/seleniumWrapper/webdriver_chrome.py index 2ce1cbcb..9ecddf96 100644 --- a/automon/integrations/seleniumWrapper/webdriver_chrome.py +++ b/automon/integrations/seleniumWrapper/webdriver_chrome.py @@ -316,11 +316,11 @@ def run(self) -> bool: return True self._webdriver = selenium.webdriver.Chrome(options=self.chrome_options) - logger.info(f'{self}') + logger.info(f'webdriver :: chrome :: run :: {self=}') return True except Exception as exception: - raise Exception(f'webdriver :: chrome :: run :: failed :: {exception}') + raise Exception(f'webdriver :: chrome :: run :: failed :: {exception=}') def set_chromedriver(self, chromedriver_path: str): logger.debug(f'{chromedriver_path}')