diff --git a/Browser/keywords/playwright_state.py b/Browser/keywords/playwright_state.py index 84bb369ae..345e8815b 100755 --- a/Browser/keywords/playwright_state.py +++ b/Browser/keywords/playwright_state.py @@ -725,6 +725,7 @@ def new_context( [https://forum.robotframework.org/t/comments-for-new-context/4307|Comment >>] """ params = locals_to_params(locals()) + params = convert_typed_dict(self.new_context.__annotations__, params) params = self._set_video_path(params) params = self._set_video_size_to_int(params) reduced_motion = str(params.get("reducedMotion")) @@ -739,7 +740,6 @@ def new_context( httpCredentials, params.get("httpCredentials"), "httpCredentials" ) params["httpCredentials"] = secret - params = convert_typed_dict(self.new_context.__annotations__, params) if not videosPath: params.pop("videoSize", None) trace_file = params.pop("tracing", None) diff --git a/atest/test/01_Browser_Management/video.robot b/atest/test/01_Browser_Management/video.robot index a477c7e5e..aebd33773 100644 --- a/atest/test/01_Browser_Management/video.robot +++ b/atest/test/01_Browser_Management/video.robot @@ -14,6 +14,7 @@ Create Video With Full Path New Page ${LOGIN_URL} Go To ${FRAMES_URL} Verify Video Files 1 + Should Be Equal ${record_video.dir} ${OUTPUT_DIR}/video Create Video With Relative Path [Documentation] @@ -28,6 +29,7 @@ Create Video With Relative Path Wait File Count In Directory ${OUTPUT_DIR}/browser/video/my_video ${1} Should Start With ${details}[video_path] ${OUTPUT_DIR}${/}browser${/}video${/}my_video Should End With ${details}[video_path] .webm + Should Be Equal ${record_video.dir} my_video Create Video With VideoSize [Documentation] @@ -38,6 +40,7 @@ Create Video With VideoSize New Page ${LOGIN_URL} Go To ${FRAMES_URL} Verify Video Files ${2} + Should Be Equal ${record_video.dir} ${OUTPUT_DIR}/video Create Video With Viewport [Documentation] @@ -48,6 +51,7 @@ Create Video With Viewport New Page ${LOGIN_URL} Go To ${FRAMES_URL} Verify Video Files ${3} + Should Be Equal ${record_video.dir} ${OUTPUT_DIR}/video No Video [Documentation] @@ -75,6 +79,7 @@ Video Must Be Created When Close Browser Is Called Go To ${FRAMES_URL} Close Browser ALL Wait File Count In Directory ${OUTPUT_DIR}/video ${1} + Should Be Equal ${record_video.dir} ${OUTPUT_DIR}/video *** Keywords *** Video Setup