diff --git a/automon/integrations/seleniumWrapper/browser.py b/automon/integrations/seleniumWrapper/browser.py index 4db91e81..bd042eb3 100644 --- a/automon/integrations/seleniumWrapper/browser.py +++ b/automon/integrations/seleniumWrapper/browser.py @@ -378,17 +378,32 @@ def get_random_user_agent(self, filter: list or str = None, case_sensitive: bool return SeleniumUserAgentBuilder().get_random(filter=filter, case_sensitive=case_sensitive) @_is_running - def get_screenshot_as_png(self, **kwargs): - """screenshot as png""" - screenshot = self.webdriver.get_screenshot_as_png(**kwargs) + def get_screenshot_as_base64(self, **kwargs): + """screenshot as base64""" + screenshot = self.webdriver.get_screenshot_as_base64(**kwargs) log.debug(f'{round(len(screenshot) / 1024)} KB') return screenshot + def get_screenshot_as_file( + self, + filename: str = None, + prefix: str = None, + folder: str = None, + **kwargs + ) -> bool: + return self.save_screenshot( + self, + filename=filename, + prefix=prefix, + folder=folder, + **kwargs + ) + @_is_running - def get_screenshot_as_base64(self, **kwargs): - """screenshot as base64""" - screenshot = self.webdriver.get_screenshot_as_base64(**kwargs) + def get_screenshot_as_png(self, **kwargs): + """screenshot as png""" + screenshot = self.webdriver.get_screenshot_as_png(**kwargs) log.debug(f'{round(len(screenshot) / 1024)} KB') return screenshot