Skip to content

Commit 7de7545

Browse files
authored
Merge branch 'trunk' into py-daemon-threads
2 parents 79ae076 + 3f9c5cb commit 7de7545

File tree

26 files changed

+181
-49
lines changed

26 files changed

+181
-49
lines changed

.github/workflows/bazel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ jobs:
126126
with:
127127
bazelisk-cache: true
128128
bazelrc: common --color=yes
129+
# Workaround for long path issues: https://github.com/bazelbuild/bazel/pull/22532
130+
output-base: ${{ inputs.os == 'windows' && 'D://b' || '' }}
129131
cache-version: 2
130132
disk-cache: ${{ inputs.cache-key }}
131133
external-cache: |

.github/workflows/ci-python.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,13 @@ jobs:
9999
os: ubuntu
100100
- browser: firefox
101101
os: ubuntu
102-
- browser: chrome
103-
os: windows
104-
- browser: edge
105-
os: windows
106102
with:
107103
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
108104
browser: ${{ matrix.browser }}
109105
os: ${{ matrix.os }}
110106
cache-key: py-browser-${{ matrix.browser }}
111107
run: |
112-
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi
113-
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:test-${{ matrix.browser }}
108+
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }}
114109
115110
safari-tests:
116111
name: Browser Tests
@@ -128,5 +123,4 @@ jobs:
128123
os: ${{ matrix.os }}
129124
cache-key: py-browser-${{ matrix.browser }}
130125
run: |
131-
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}
132-
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:test-${{ matrix.browser }}
126+
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }}

dotnet/src/webdriver/BiDi/Browser/ClientWindow.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
21+
using System.Text.Json.Serialization;
22+
2023
namespace OpenQA.Selenium.BiDi.Browser;
2124

25+
[JsonConverter(typeof(BrowserClientWindowConverter))]
2226
public sealed record ClientWindow
2327
{
2428
internal ClientWindow(string id)

dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
2122
using System.Collections;
2223
using System.Collections.Generic;
24+
using System.Text.Json.Serialization;
2325

2426
namespace OpenQA.Selenium.BiDi.Browser;
2527

@@ -28,6 +30,7 @@ internal sealed class GetClientWindowsCommand()
2830

2931
public sealed class GetClientWindowsOptions : CommandOptions;
3032

33+
[JsonConverter(typeof(GetClientWindowsResultConverter))]
3134
public sealed record GetClientWindowsResult : EmptyResult, IReadOnlyList<ClientWindowInfo>
3235
{
3336
internal GetClientWindowsResult(IReadOnlyList<ClientWindowInfo> clientWindows)

dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
2122
using System.Collections;
2223
using System.Collections.Generic;
24+
using System.Text.Json.Serialization;
2325

2426
namespace OpenQA.Selenium.BiDi.Browser;
2527

@@ -28,6 +30,7 @@ internal sealed class GetUserContextsCommand()
2830

2931
public class GetUserContextsOptions : CommandOptions;
3032

33+
[JsonConverter(typeof(GetUserContextsResultConverter))]
3134
public sealed record GetUserContextsResult : EmptyResult, IReadOnlyList<UserContextInfo>
3235
{
3336
internal GetUserContextsResult(IReadOnlyList<UserContextInfo> userContexts)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Polymorphic;
2021
using System;
22+
using System.Text.Json.Serialization;
2123

2224
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2325

2426
// https://github.com/dotnet/runtime/issues/72604
2527
//[JsonPolymorphic(TypeDiscriminatorPropertyName = "status")]
2628
//[JsonDerivedType(typeof(DownloadCanceledEventArgs), "canceled")]
2729
//[JsonDerivedType(typeof(DownloadCompleteEventArgs), "complete")]
30+
[JsonConverter(typeof(DownloadEndEventArgsConverter))]
2831
public abstract record DownloadEndEventArgs(BiDi BiDi, BrowsingContext Context)
2932
: BrowsingContextEventArgs(BiDi, Context);
3033

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
2122
using System.Collections;
2223
using System.Collections.Generic;
24+
using System.Text.Json.Serialization;
2325

2426
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2527

@@ -47,6 +49,7 @@ public sealed record BrowsingContextGetTreeOptions
4749
public long? MaxDepth { get; set; }
4850
}
4951

52+
[JsonConverter(typeof(GetTreeResultConverter))]
5053
public sealed record GetTreeResult : EmptyResult, IReadOnlyList<BrowsingContextInfo>
5154
{
5255
internal GetTreeResult(IReadOnlyList<BrowsingContextInfo> contexts)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21+
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
2122
using System.Collections;
2223
using System.Collections.Generic;
24+
using System.Text.Json.Serialization;
2325

2426
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2527

@@ -37,6 +39,7 @@ public sealed class LocateNodesOptions : CommandOptions
3739
public IEnumerable<Script.ISharedReference>? StartNodes { get; set; }
3840
}
3941

42+
[JsonConverter(typeof(LocateNodesResultConverter))]
4043
public sealed record LocateNodesResult : EmptyResult, IReadOnlyList<Script.NodeRemoteValue>
4144
{
4245
internal LocateNodesResult(IReadOnlyList<Script.NodeRemoteValue> nodes)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
21+
using System.Text.Json.Serialization;
22+
2023
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2124

25+
[JsonConverter(typeof(NavigationConverter))]
2226
public sealed record Navigation(string Id);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public struct PrintPage
7272
public double? Width { get; set; }
7373
}
7474

75+
[JsonConverter(typeof(PrintPageRangeConverter))]
7576
public readonly record struct PrintPageRange(int? Start, int? End)
7677
{
7778
public static implicit operator PrintPageRange(int index) { return new PrintPageRange(index, index); }

0 commit comments

Comments
 (0)