Skip to content

Commit 0345b23

Browse files
authored
Merge branch 'trunk' into rb_bidi_set_client_window_state
2 parents 0a2c63f + b154cc7 commit 0345b23

File tree

170 files changed

+1594
-1221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+1594
-1221
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dotnet/src/webdriver/obj
2222
java/build/production
2323
java/client/build
2424
java/server/build
25+
javascript/atoms/node_modules
2526
javascript/grid-ui/node_modules
2627
javascript/selenium-webdriver/node_modules
2728
node_modules

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ npm.npm_translate_lock(
6767
data = [
6868
"@//:package.json",
6969
"@//:pnpm-workspace.yaml",
70+
"@//javascript/atoms:package.json",
7071
"@//javascript/grid-ui:package.json",
7172
"@//javascript/selenium-webdriver:package.json",
7273
],

common/mirror/selenium

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
[
22
{
3-
"tag_name": "selenium-4.39.0",
3+
"tag_name": "nightly",
44
"assets": [
55
{
6-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-dotnet-4.39.0.zip"
7-
},
8-
{
9-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-dotnet-strongnamed-4.39.0.zip"
10-
},
11-
{
12-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-java-4.39.0.zip"
6+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.40.0-SNAPSHOT.zip"
137
},
148
{
15-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-server-4.39.0.jar"
9+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.40.0-SNAPSHOT.jar"
1610
},
1711
{
18-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-server-4.39.0.zip"
12+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.40.0-SNAPSHOT.zip"
1913
}
2014
]
2115
},
2216
{
23-
"tag_name": "nightly",
17+
"tag_name": "selenium-4.39.0",
2418
"assets": [
2519
{
26-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.40.0-SNAPSHOT.zip"
20+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-dotnet-4.39.0.zip"
2721
},
2822
{
29-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.40.0-SNAPSHOT.jar"
23+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-dotnet-strongnamed-4.39.0.zip"
3024
},
3125
{
32-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.40.0-SNAPSHOT.zip"
26+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-java-4.39.0.zip"
27+
},
28+
{
29+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-server-4.39.0.jar"
30+
},
31+
{
32+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.39.0/selenium-server-4.39.0.zip"
3333
}
3434
]
3535
},

common/src/web/blank.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<html><head><title>blank</title></head><body></body></html>
1+
<html><head><title>blank</title></head><body>
2+
<script>
3+
localStorage.clear();
4+
sessionStorage.clear();
5+
</script>
6+
</body></html>

dotnet/src/webdriver/BiDi/Emulation/EmulationModule.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ public async Task<SetScreenOrientationOverrideResult> SetScreenOrientationOverri
7070
return await Broker.ExecuteCommandAsync(new SetScreenOrientationOverrideCommand(@params), options, _jsonContext.SetScreenOrientationOverrideCommand, _jsonContext.SetScreenOrientationOverrideResult).ConfigureAwait(false);
7171
}
7272

73+
public async Task<SetScreenSettingsOverrideResult> SetScreenSettingsOverrideAsync(ScreenArea? screenArea, SetScreenSettingsOverrideOptions? options = null)
74+
{
75+
var @params = new SetScreenSettingsOverrideParameters(screenArea, options?.Contexts, options?.UserContexts);
76+
77+
return await Broker.ExecuteCommandAsync(new SetScreenSettingsOverrideCommand(@params), options, _jsonContext.SetScreenSettingsOverrideCommand, _jsonContext.SetScreenSettingsOverrideResult).ConfigureAwait(false);
78+
}
79+
7380
public async Task<SetGeolocationOverrideResult> SetGeolocationCoordinatesOverrideAsync(double latitude, double longitude, SetGeolocationCoordinatesOverrideOptions? options = null)
7481
{
7582
var coordinates = new GeolocationCoordinates(latitude, longitude, options?.Accuracy, options?.Altitude, options?.AltitudeAccuracy, options?.Heading, options?.Speed);
@@ -114,6 +121,8 @@ protected override void Initialize(JsonSerializerOptions jsonSerializerOptions)
114121
[JsonSerializable(typeof(SetScriptingEnabledResult))]
115122
[JsonSerializable(typeof(SetScreenOrientationOverrideCommand))]
116123
[JsonSerializable(typeof(SetScreenOrientationOverrideResult))]
124+
[JsonSerializable(typeof(SetScreenSettingsOverrideCommand))]
125+
[JsonSerializable(typeof(SetScreenSettingsOverrideResult))]
117126
[JsonSerializable(typeof(SetGeolocationOverrideCommand))]
118127
[JsonSerializable(typeof(SetGeolocationOverrideResult))]
119128

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// <copyright file="SetScreenSettingsOverrideCommand.cs" company="Selenium Committers">
2+
// Licensed to the Software Freedom Conservancy (SFC) under one
3+
// or more contributor license agreements. See the NOTICE file
4+
// distributed with this work for additional information
5+
// regarding copyright ownership. The SFC licenses this file
6+
// to you under the Apache License, Version 2.0 (the
7+
// "License"); you may not use this file except in compliance
8+
// with the License. You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing,
13+
// software distributed under the License is distributed on an
14+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
// KIND, either express or implied. See the License for the
16+
// specific language governing permissions and limitations
17+
// under the License.
18+
// </copyright>
19+
20+
using System.Collections.Generic;
21+
using System.Text.Json.Serialization;
22+
23+
namespace OpenQA.Selenium.BiDi.Emulation;
24+
25+
internal sealed class SetScreenSettingsOverrideCommand(SetScreenSettingsOverrideParameters @params)
26+
: Command<SetScreenSettingsOverrideParameters, SetScreenSettingsOverrideResult>(@params, "emulation.setScreenSettingsOverride");
27+
28+
internal sealed record SetScreenSettingsOverrideParameters([property: JsonIgnore(Condition = JsonIgnoreCondition.Never)] ScreenArea? ScreenArea, IEnumerable<BrowsingContext.BrowsingContext>? Contexts, IEnumerable<Browser.UserContext>? UserContexts) : Parameters;
29+
30+
public sealed class SetScreenSettingsOverrideOptions : CommandOptions
31+
{
32+
public IEnumerable<BrowsingContext.BrowsingContext>? Contexts { get; set; }
33+
34+
public IEnumerable<Browser.UserContext>? UserContexts { get; set; }
35+
}
36+
37+
public sealed record ScreenArea(long Width, long Height);
38+
39+
public sealed record SetScreenSettingsOverrideResult : EmptyResult;

dotnet/test/common/AlertsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ public void ShouldNotHandleAlertInAnotherWindow()
420420
IWebElement el = driver.FindElement(By.Id("open-new-window"));
421421
WaitFor<IAlert>(AlertToBePresent, TimeSpan.FromSeconds(5), "No alert found");
422422
},
423-
Throws.TypeOf<WebDriverException>());
423+
Throws.InstanceOf<WebDriverException>());
424424

425425
}
426426
finally

dotnet/test/common/BiDi/Browser/BrowserTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace OpenQA.Selenium.BiDi.Browser;
2525

26-
class BrowserTest : BiDiTestFixture
26+
internal class BrowserTest : BiDiTestFixture
2727
{
2828
[Test]
2929
public async Task CanCreateUserContext()

dotnet/test/common/BiDi/BrowsingContext/BrowsingContextEventsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2525

26-
class BrowsingContextEventsTest : BiDiTestFixture
26+
internal class BrowsingContextEventsTest : BiDiTestFixture
2727
{
2828
[Test]
2929
[IgnoreBrowser(Selenium.Browser.Firefox, "Not supported yet?")]

dotnet/test/common/BiDi/BrowsingContext/BrowsingContextTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace OpenQA.Selenium.BiDi.BrowsingContext;
2525

26-
class BrowsingContextTest : BiDiTestFixture
26+
internal class BrowsingContextTest : BiDiTestFixture
2727
{
2828
[Test]
2929
public async Task CanCreateNewTab()

0 commit comments

Comments
 (0)