Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public abstract record PrimitiveProtocolLocalValue : LocalValue

}

public record Number(long Value) : PrimitiveProtocolLocalValue
public record Number(double Value) : PrimitiveProtocolLocalValue
{
public static explicit operator Number(int n) => new Number(n);
public static explicit operator Number(double n) => new Number(n);
}

public record String(string Value) : PrimitiveProtocolLocalValue;
Expand Down
4 changes: 2 additions & 2 deletions dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Script;
public abstract record RemoteValue
{
public static implicit operator int(RemoteValue remoteValue) => (int)((Number)remoteValue).Value;
public static implicit operator long(RemoteValue remoteValue) => ((Number)remoteValue).Value;
public static implicit operator long(RemoteValue remoteValue) => (long)((Number)remoteValue).Value;
public static implicit operator string(RemoteValue remoteValue)
{
return remoteValue switch
Expand Down Expand Up @@ -93,7 +93,7 @@ public static implicit operator string(RemoteValue remoteValue)
throw new BiDiException("Cannot convert .....");
}

public record Number(long Value) : PrimitiveProtocolRemoteValue;
public record Number(double Value) : PrimitiveProtocolRemoteValue;

public record Boolean(bool Value) : PrimitiveProtocolRemoteValue;

Expand Down
Loading