[FIX] script selenium: show screencast directory only when create video
This commit is contained in:
parent
d27e366d97
commit
467bcdfedf
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue