Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def stop_rec_and_save_videoreport(mdriver, request):
- b64_video = mdriver.stop_recording_screen()
- # TODO: that's too much info!
- # logging.info("Base64-encoded-screencast-for-test")
- # logging.info(b64_video)
- test_class_dir = video_reports_dir + os.sep + "/".join(pytest_current_test.split("::")[0:-1])
- testname = pytest_current_test.split("::")[-1]\
- .replace(" (teardown)", "") \
- if "teardown" in pytest_current_test else pytest_current_test.split("::")[-1]
- Path(test_class_dir).mkdir(parents=True, exist_ok=True)
- with open(test_class_dir + os.sep + testname + ".mp4", "wb") as fh:
- fh.write(base64.b64decode(b64_video))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement