Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Browser/keywords/playwright_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions atest/test/01_Browser_Management/video.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down