Skip to content

Commit

Permalink
[dotnet] [bidi] Simplify browsing context type enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Sep 15, 2024
1 parent 3e02303 commit 35dd34a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/BiDi/BiDi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static async Task<BiDi> ConnectAsync(string url)
return bidi;
}

public Task<Modules.BrowsingContext.BrowsingContext> CreateContextAsync(Modules.BrowsingContext.BrowsingContextType type, Modules.BrowsingContext.CreateOptions? options = null)
public Task<Modules.BrowsingContext.BrowsingContext> CreateContextAsync(Modules.BrowsingContext.ContextType type, Modules.BrowsingContext.CreateOptions? options = null)
{
return BrowsingContextModule.CreateAsync(type, options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;

public class BrowsingContextModule(Broker broker) : Module(broker)
{
public async Task<BrowsingContext> CreateAsync(BrowsingContextType type, CreateOptions? options = null)
public async Task<BrowsingContext> CreateAsync(ContextType type, CreateOptions? options = null)
{
var @params = new CreateCommandParameters(type);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;

internal class CreateCommand(CreateCommandParameters @params) : Command<CreateCommandParameters>(@params);

internal record CreateCommandParameters(BrowsingContextType Type) : CommandParameters
internal record CreateCommandParameters(ContextType Type) : CommandParameters
{
public BrowsingContext? ReferenceContext { get; set; }

Expand All @@ -22,7 +22,7 @@ public record CreateOptions : CommandOptions
public Browser.UserContext? UserContext { get; set; }
}

public enum BrowsingContextType
public enum ContextType
{
Tab,
Window
Expand Down

0 comments on commit 35dd34a

Please sign in to comment.