@@ -24,6 +24,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Log;
24
24
25
25
// https://github.com/dotnet/runtime/issues/72604
26
26
//[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
27
+ //[JsonDerivedType(typeof(GenericLogEntry))] // Fallback when discriminator is not recognized, we have to double check
27
28
//[JsonDerivedType(typeof(ConsoleLogEntry), "console")]
28
29
//[JsonDerivedType(typeof(JavascriptLogEntry), "javascript")]
29
30
public abstract record LogEntry ( BiDi BiDi , Level Level , Script . Source Source , string Text , DateTimeOffset Timestamp )
@@ -32,6 +33,9 @@ public abstract record LogEntry(BiDi BiDi, Level Level, Script.Source Source, st
32
33
public Script . StackTrace ? StackTrace { get ; set ; }
33
34
}
34
35
36
+ public record GenericLogEntry ( BiDi BiDi , string Type , Level Level , Script . Source Source , string Text , DateTimeOffset Timestamp )
37
+ : LogEntry ( BiDi , Level , Source , Text , Timestamp ) ;
38
+
35
39
public record ConsoleLogEntry ( BiDi BiDi , Level Level , Script . Source Source , string Text , DateTimeOffset Timestamp , string Method , IReadOnlyList < Script . RemoteValue > Args )
36
40
: LogEntry ( BiDi , Level , Source , Text , Timestamp ) ;
37
41
0 commit comments