From 467bcdfedf9e55d84d6dbeff314e4ddea55d9b67 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 30 Jul 2025 22:35:27 -0400 Subject: [PATCH] [FIX] script selenium: show screencast directory only when create video --- script/selenium/selenium_lib.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/selenium/selenium_lib.py b/script/selenium/selenium_lib.py index d802867..c9fc2cc 100644 --- a/script/selenium/selenium_lib.py +++ b/script/selenium/selenium_lib.py @@ -58,8 +58,7 @@ class SeleniumLib(object): self.filename_recording = os.path.join( dir_path_screencast, self.filename_recording ) - if not os.path.isdir(dir_path_screencast): - os.mkdir(dir_path_screencast) + self.dirname_recording = dir_path_screencast self.driver = None with open(".odoo-version") as txt: self.odoo_version = txt.read() @@ -143,6 +142,9 @@ class SeleniumLib(object): sys.path.append(new_path) from script.selenium.selenium_video import VideoRecorder + if not os.path.isdir(self.dirname_recording): + os.mkdir(self.dirname_recording) + self.video_recorder = VideoRecorder( self.driver, filename=self.filename_recording )