Bugfix - Watches with BrowserSteps should recreate the data-dir if it was missing (in the case that you deleted/migrated) (#2484)

This commit is contained in:
dgtlmoon
2024-07-11 15:03:30 +02:00
committed by GitHub
parent 5437144dff
commit 732ae1d935
2 changed files with 9 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ class fetcher(Fetcher):
self.proxy['password'] = parsed.password
def screenshot_step(self, step_n=''):
super().screenshot_step(step_n=step_n)
screenshot = self.page.screenshot(type='jpeg', full_page=True, quality=int(os.getenv("SCREENSHOT_QUALITY", 72)))
if self.browser_steps_screenshot_path is not None:
@@ -67,6 +68,7 @@ class fetcher(Fetcher):
f.write(screenshot)
def save_step_html(self, step_n):
super().save_step_html(step_n=step_n)
content = self.page.content()
destination = os.path.join(self.browser_steps_screenshot_path, 'step_{}.html'.format(step_n))
logger.debug(f"Saving step HTML to {destination}")