Skip to content

Commit 604e5e3

Browse files
authored
Merge branch 'trunk' into syber911911-feature-branch
2 parents b2f8254 + 3e02303 commit 604e5e3

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
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.BrowsingContextType 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/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
}

0 commit comments

Comments
 (0)