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")