Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b250a33

Browse files
nvborisenkosandeepsuryaprasad
authored andcommittedMar 23, 2025
[dotnet][bidi] Underlying local/remote script number as double (SeleniumHQ#15301)
1 parent 1a254fa commit b250a33

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public abstract record PrimitiveProtocolLocalValue : LocalValue
7777

7878
}
7979

80-
public record Number(long Value) : PrimitiveProtocolLocalValue
80+
public record Number(double Value) : PrimitiveProtocolLocalValue
8181
{
82-
public static explicit operator Number(int n) => new Number(n);
82+
public static explicit operator Number(double n) => new Number(n);
8383
}
8484

8585
public record String(string Value) : PrimitiveProtocolLocalValue;

‎dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Script;
5656
public abstract record RemoteValue
5757
{
5858
public static implicit operator int(RemoteValue remoteValue) => (int)((Number)remoteValue).Value;
59-
public static implicit operator long(RemoteValue remoteValue) => ((Number)remoteValue).Value;
59+
public static implicit operator long(RemoteValue remoteValue) => (long)((Number)remoteValue).Value;
6060
public static implicit operator string(RemoteValue remoteValue)
6161
{
6262
return remoteValue switch
@@ -93,7 +93,7 @@ public static implicit operator string(RemoteValue remoteValue)
9393
throw new BiDiException("Cannot convert .....");
9494
}
9595

96-
public record Number(long Value) : PrimitiveProtocolRemoteValue;
96+
public record Number(double Value) : PrimitiveProtocolRemoteValue;
9797

9898
public record Boolean(bool Value) : PrimitiveProtocolRemoteValue;
9999

0 commit comments

Comments
 (0)
Please sign in to comment.