Skip to content

Commit

Permalink
cdp browser: video capturing: stopping: fix delays
Browse files Browse the repository at this point in the history
Previously, `Browser.stop_video_capturing` stopped the video capturing before
inserting the delay.

This patch fixes the order of the calls.

Signed-off-by: Florian Scherf <[email protected]>
  • Loading branch information
fscherf committed Jul 9, 2024
1 parent 9686629 commit 2aac3d9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions milan/cdp/websocket_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,10 @@ def stop_video_capturing(
'CDP based video recording is not supported in firefox',
)

# FIXME: add comment
self.force_rerender()

return_value = self.cdp_websocket_client.stop_video_capturing()

if delay:
time.sleep(delay)

return return_value
# FIXME: add comment
self.force_rerender()

return self.cdp_websocket_client.stop_video_capturing()

0 comments on commit 2aac3d9

Please sign in to comment.