From 639fa5217cd82c7153b1914fcbfe7b26fbc4145a Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Sat, 29 Jun 2024 17:06:58 +0900 Subject: [PATCH] Fixed a broken JSON in log output (#464) --- lib/ferrum/client/web_socket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ferrum/client/web_socket.rb b/lib/ferrum/client/web_socket.rb index 2f35648..c3d7119 100644 --- a/lib/ferrum/client/web_socket.rb +++ b/lib/ferrum/client/web_socket.rb @@ -63,7 +63,7 @@ def on_message(event) output = event.data if SKIP_LOGGING_SCREENSHOTS && @screenshot_commands[data["id"]] @screenshot_commands.delete(data["id"]) - output.sub!(/{"data":"(.*)"}/, %("Set FERRUM_LOGGING_SCREENSHOTS=true to see screenshots in Base64")) + output.sub!(/{"data":"[^"]*"}/, %("Set FERRUM_LOGGING_SCREENSHOTS=true to see screenshots in Base64")) end @logger&.puts(" ◀ #{Utils::ElapsedTime.elapsed_time} #{output}\n")