diff --git a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs index bbede96ad4654..6b2ac687f5d45 100644 --- a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs +++ b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs @@ -25,7 +25,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext; internal class CaptureScreenshotCommand(CaptureScreenshotCommandParameters @params) : Command(@params, "browsingContext.captureScreenshot"); -internal record CaptureScreenshotCommandParameters(BrowsingContext Context, CaptureScreenshotOptions.ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : CommandParameters; +internal record CaptureScreenshotCommandParameters(BrowsingContext Context, ScreenshotOrigin? Origin, ImageFormat? Format, ClipRectangle? Clip) : CommandParameters; public record CaptureScreenshotOptions : CommandOptions { @@ -34,12 +34,12 @@ public record CaptureScreenshotOptions : CommandOptions public ImageFormat? Format { get; set; } public ClipRectangle? Clip { get; set; } +} - public enum ScreenshotOrigin - { - Viewport, - Document - } +public enum ScreenshotOrigin +{ + Viewport, + Document } public record struct ImageFormat(string Type) diff --git a/dotnet/test/common/BiDi/BrowsingContext/BrowsingContextTest.cs b/dotnet/test/common/BiDi/BrowsingContext/BrowsingContextTest.cs index 40200ff415930..6fabd12e57b62 100644 --- a/dotnet/test/common/BiDi/BrowsingContext/BrowsingContextTest.cs +++ b/dotnet/test/common/BiDi/BrowsingContext/BrowsingContextTest.cs @@ -259,7 +259,7 @@ public async Task CanCaptureScreenshotWithParameters() { var screenshot = await context.CaptureScreenshotAsync(new() { - Origin = CaptureScreenshotOptions.ScreenshotOrigin.Document, + Origin = ScreenshotOrigin.Document, Clip = new BoxClipRectangle(5, 5, 10, 10) }); @@ -272,7 +272,7 @@ public async Task CanCaptureScreenshotOfViewport() { var screenshot = await context.CaptureScreenshotAsync(new() { - Origin = CaptureScreenshotOptions.ScreenshotOrigin.Viewport, + Origin = ScreenshotOrigin.Viewport, Clip = new BoxClipRectangle(5, 5, 10, 10) });