Skip to content

Commit 510b50e

Browse files
authored
Merge branch 'trunk' into rb_use_env_var_for_driver_location
2 parents e982b78 + 35dd34a commit 510b50e

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

dotnet/src/webdriver/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ csharp_library(
6767
"**/*.cs",
6868
]) + devtools_version_targets(),
6969
out = "WebDriver",
70+
defines = [
71+
"NET8_0_OR_GREATER",
72+
],
7073
internals_visible_to = [
7174
"WebDriver.Common.Tests",
7275
],
@@ -128,6 +131,9 @@ csharp_library(
128131
"**/*.cs",
129132
]) + devtools_version_targets(),
130133
out = "WebDriver.StrongNamed",
134+
defines = [
135+
"NET8_0_OR_GREATER",
136+
],
131137
keyfile = "//dotnet:WebDriver.snk",
132138
langversion = "12.0",
133139
resources = [

dotnet/src/webdriver/BiDi/BiDi.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ public static async Task<BiDi> ConnectAsync(string url)
6060
return bidi;
6161
}
6262

63-
public Task<Modules.BrowsingContext.BrowsingContext> CreateBrowsingContextAsync(Modules.BrowsingContext.BrowsingContextType type, Modules.BrowsingContext.CreateOptions? options = null)
63+
public Task<Modules.BrowsingContext.BrowsingContext> CreateContextAsync(Modules.BrowsingContext.ContextType type, Modules.BrowsingContext.CreateOptions? options = null)
6464
{
6565
return BrowsingContextModule.CreateAsync(type, options);
6666
}
6767

68-
public Task<IReadOnlyList<Modules.BrowsingContext.BrowsingContextInfo>> GetBrowsingContextTreeAsync(Modules.BrowsingContext.GetTreeOptions? options = null)
68+
public Task<IReadOnlyList<Modules.BrowsingContext.BrowsingContextInfo>> GetTreeAsync(Modules.BrowsingContext.GetTreeOptions? options = null)
6969
{
7070
return BrowsingContextModule.GetTreeAsync(options);
7171
}
@@ -82,22 +82,22 @@ public async ValueTask DisposeAsync()
8282
_transport?.Dispose();
8383
}
8484

85-
public Task<Subscription> OnBrowsingContextCreatedAsync(Func<Modules.BrowsingContext.BrowsingContextInfo, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
85+
public Task<Subscription> OnContextCreatedAsync(Func<Modules.BrowsingContext.BrowsingContextInfo, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
8686
{
8787
return BrowsingContextModule.OnContextCreatedAsync(handler, options);
8888
}
8989

90-
public Task<Subscription> OnBrowsingContextCreatedAsync(Action<Modules.BrowsingContext.BrowsingContextInfo> handler, BrowsingContextsSubscriptionOptions? options = null)
90+
public Task<Subscription> OnContextCreatedAsync(Action<Modules.BrowsingContext.BrowsingContextInfo> handler, BrowsingContextsSubscriptionOptions? options = null)
9191
{
9292
return BrowsingContextModule.OnContextCreatedAsync(handler, options);
9393
}
9494

95-
public Task<Subscription> OnBrowsingContextDestroyedAsync(Func<Modules.BrowsingContext.BrowsingContextInfo, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
95+
public Task<Subscription> OnContextDestroyedAsync(Func<Modules.BrowsingContext.BrowsingContextInfo, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
9696
{
9797
return BrowsingContextModule.OnContextDestroyedAsync(handler, options);
9898
}
9999

100-
public Task<Subscription> OnBrowsingContextDestroyedAsync(Action<Modules.BrowsingContext.BrowsingContextInfo> handler, BrowsingContextsSubscriptionOptions? options = null)
100+
public Task<Subscription> OnContextDestroyedAsync(Action<Modules.BrowsingContext.BrowsingContextInfo> handler, BrowsingContextsSubscriptionOptions? options = null)
101101
{
102102
return BrowsingContextModule.OnContextDestroyedAsync(handler, options);
103103
}

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
77

88
public class BrowsingContextModule(Broker broker) : Module(broker)
99
{
10-
public async Task<BrowsingContext> CreateAsync(BrowsingContextType type, CreateOptions? options = null)
10+
public async Task<BrowsingContext> CreateAsync(ContextType type, CreateOptions? options = null)
1111
{
1212
var @params = new CreateCommandParameters(type);
1313

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,5 @@ public record ElementClipRectangle(Script.SharedReference Element) : ClipRectang
4545

4646
public record CaptureScreenshotResult(string Data)
4747
{
48-
public byte[] AsBytes()
49-
{
50-
return System.Convert.FromBase64String(Data);
51-
}
48+
public byte[] ToByteArray() => System.Convert.FromBase64String(Data);
5249
}

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CreateCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
44

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

7-
internal record CreateCommandParameters(BrowsingContextType Type) : CommandParameters
7+
internal record CreateCommandParameters(ContextType Type) : CommandParameters
88
{
99
public BrowsingContext? ReferenceContext { get; set; }
1010

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

25-
public enum BrowsingContextType
25+
public enum ContextType
2626
{
2727
Tab,
2828
Window

0 commit comments

Comments
 (0)