Skip to content

Commit 9318b7a

Browse files
committed
[dotnet] [bidi] Implicit conversion screenshot to bytes
1 parent e943cc1 commit 9318b7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshotCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,7 @@ public record ElementClipRectangle(Script.ISharedReference Element) : ClipRectan
5858

5959
public record CaptureScreenshotResult(string Data) : EmptyResult
6060
{
61+
public static implicit operator byte[](CaptureScreenshotResult captureScreenshotResult) => captureScreenshotResult.ToByteArray();
62+
6163
public byte[] ToByteArray() => System.Convert.FromBase64String(Data);
6264
}

0 commit comments

Comments
 (0)