From a452215da6338ce66fe4396b71d059803687014a Mon Sep 17 00:00:00 2001 From: Peter Singh Date: Sat, 4 Jan 2025 20:54:20 +0000 Subject: [PATCH] Fixes for running with Cuprite on v0.15 --- lib/ferrum/page/screencast.rb | 4 ++-- lib/ferrum/screencaster.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ferrum/page/screencast.rb b/lib/ferrum/page/screencast.rb index 1ad3a02f..7638f785 100644 --- a/lib/ferrum/page/screencast.rb +++ b/lib/ferrum/page/screencast.rb @@ -7,8 +7,8 @@ class Page module Screencast attr_reader :screencaster - def start_screencast - @screencaster.start_screencast + def start_screencast(...) + @screencaster.start_screencast(...) end def stop_screencast diff --git a/lib/ferrum/screencaster.rb b/lib/ferrum/screencaster.rb index c70ea716..3fbc801c 100644 --- a/lib/ferrum/screencaster.rb +++ b/lib/ferrum/screencaster.rb @@ -27,8 +27,8 @@ def add_frame(params) def recordings_dir return @recordings_dir if defined? @recordings_dir - session_id = @page.client.session_id - @recordings_dir = FileUtils.mkdir_p("#{@base_dir}/screencast_recordings/#{session_id}/").first + timestamp = (Time.now.to_f * 1000).to_i + @recordings_dir = FileUtils.mkdir_p("#{@base_dir}/screencast_recordings/#{timestamp}/").first @recordings_dir end