Skip to content

Commit 18a3e90

Browse files
authored
Merge branch 'trunk' into disable-edge-test
2 parents 76c31fa + c187279 commit 18a3e90

File tree

24 files changed

+392
-300
lines changed

24 files changed

+392
-300
lines changed

.github/workflows/ci-python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install tox==4.25.0
30+
pip install tox==4.27.0
3131
- name: Generate docs
3232
run: tox -c py/tox.ini
3333
env:
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
50-
pip install tox==4.25.0
50+
pip install tox==4.27.0
5151
- name: Run type checking
5252
run: |
5353
tox -c py/tox.ini || true

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ public Task<Subscription> OnFragmentNavigatedAsync(Action<NavigationInfo> handle
147147
return BiDi.BrowsingContext.OnFragmentNavigatedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] });
148148
}
149149

150+
public Task<Subscription> OnHistoryUpdatedAsync(Func<HistoryUpdatedEventArgs, Task> handler, SubscriptionOptions? options = null)
151+
{
152+
return BiDi.BrowsingContext.OnHistoryUpdatedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] });
153+
}
154+
155+
public Task<Subscription> OnHistoryUpdatedAsync(Action<HistoryUpdatedEventArgs> handler, SubscriptionOptions? options = null)
156+
{
157+
return BiDi.BrowsingContext.OnHistoryUpdatedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] });
158+
}
159+
150160
public Task<Subscription> OnDomContentLoadedAsync(Func<NavigationInfo, Task> handler, SubscriptionOptions? options = null)
151161
{
152162
return BiDi.BrowsingContext.OnDomContentLoadedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] });

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ public async Task<Subscription> OnFragmentNavigatedAsync(Action<NavigationInfo>
134134
return await Broker.SubscribeAsync("browsingContext.fragmentNavigated", handler, options).ConfigureAwait(false);
135135
}
136136

137+
public async Task<Subscription> OnHistoryUpdatedAsync(Func<HistoryUpdatedEventArgs, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
138+
{
139+
return await Broker.SubscribeAsync("browsingContext.historyUpdated", handler, options).ConfigureAwait(false);
140+
}
141+
142+
public async Task<Subscription> OnHistoryUpdatedAsync(Action<HistoryUpdatedEventArgs> handler, BrowsingContextsSubscriptionOptions? options = null)
143+
{
144+
return await Broker.SubscribeAsync("browsingContext.historyUpdated", handler, options).ConfigureAwait(false);
145+
}
146+
137147
public async Task<Subscription> OnDomContentLoadedAsync(Func<NavigationInfo, Task> handler, BrowsingContextsSubscriptionOptions? options = null)
138148
{
139149
return await Broker.SubscribeAsync("browsingContext.domContentLoaded", handler, options).ConfigureAwait(false);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// <copyright file="HistoryUpdatedEventArgs.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;
21+
22+
namespace OpenQA.Selenium.BiDi.BrowsingContext;
23+
24+
public record HistoryUpdatedEventArgs(BiDi BiDi, BrowsingContext Context, DateTimeOffset Timestamp, string Url)
25+
: BrowsingContextEventArgs(BiDi, Context);

dotnet/src/webdriver/BiDi/Communication/Json/BiDiJsonSerializerContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ namespace OpenQA.Selenium.BiDi.Communication.Json;
111111
[JsonSerializable(typeof(BrowsingContext.SetViewportCommand))]
112112
[JsonSerializable(typeof(BrowsingContext.TraverseHistoryCommand))]
113113
[JsonSerializable(typeof(BrowsingContext.TraverseHistoryResult))]
114+
114115
[JsonSerializable(typeof(BrowsingContext.BrowsingContextInfo))]
116+
[JsonSerializable(typeof(BrowsingContext.HistoryUpdatedEventArgs))]
115117
[JsonSerializable(typeof(BrowsingContext.NavigationInfo))]
116-
117118
[JsonSerializable(typeof(BrowsingContext.UserPromptOpenedEventArgs))]
118119
[JsonSerializable(typeof(BrowsingContext.UserPromptClosedEventArgs))]
119120

dotnet/src/webdriver/BiDi/Session/ProxyConfiguration.cs

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

20+
using System.Collections.Generic;
2021
using System.Text.Json.Serialization;
2122

2223
namespace OpenQA.Selenium.BiDi.Session;
@@ -33,19 +34,26 @@ public record AutoDetectProxyConfiguration : ProxyConfiguration;
3334

3435
public record DirectProxyConfiguration : ProxyConfiguration;
3536

36-
public record ManualProxyConfiguration : ProxyConfiguration
37+
public record ManualProxyConfiguration : ProxyConfiguration, ISocksProxyConfiguration
3738
{
38-
public string? FtpProxy { get; set; }
39-
4039
public string? HttpProxy { get; set; }
4140

4241
public string? SslProxy { get; set; }
4342

4443
public string? SocksProxy { get; set; }
4544

46-
public long? SocksVersion { get; set; }
45+
public int? SocksVersion { get; set; }
46+
47+
public IEnumerable<string>? NoProxy { get; set; }
4748
}
4849

4950
public record PacProxyConfiguration(string ProxyAutoConfigUrl) : ProxyConfiguration;
5051

5152
public record SystemProxyConfiguration : ProxyConfiguration;
53+
54+
public interface ISocksProxyConfiguration
55+
{
56+
public string? SocksProxy { get; set; }
57+
58+
public int? SocksVersion { get; set; } // 0..255
59+
}

py/docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The `selenium` package is used to automate web browser interaction from Python.
2323
| **API Docs**: | `api.html <api.html>`_ |
2424
+-------------------+------------------------------------------------+
2525

26-
Updated documentation published with each commit is available at: https://selenium-python-api-docs.readthedocs.io
26+
Updated documentation published with each commit is available at: `readthedocs.io <https://selenium-python-api-docs.readthedocs.io/en/latest>`_
2727

2828
----
2929

py/generate_api_module_listing.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
# -----------------------------------------------------------------
19-
# This script recursively scans the `selenium` package directory
20-
# to find all modules, then generates the `py/docs/source/api.rst`
21-
# file containing a listing of all modules in separate sections.
22-
# The `api.rst` file is later used by `sphinx-autogen` to generate
23-
# sphinx autodoc stub pages used in the Python API documentation.
24-
# See `py/tox.ini` for how it is invoked.
18+
19+
"""This script recursively scans the `selenium` package directory
20+
to find all modules, then generates the `py/docs/source/api.rst`
21+
file containing a listing of all modules in separate sections.
22+
The `api.rst` file is later used by `sphinx-autogen` to generate
23+
sphinx autodoc stub pages used in the Python API documentation.
24+
See `py/tox.ini` for how it is invoked."""
2525

2626
import os
2727
import site
@@ -47,8 +47,8 @@ def find_modules(package_name):
4747
package_name = "selenium"
4848
output_file = os.path.join("docs", "source", "api.rst")
4949
print(f"generating module list for sphinx autodoc in: {output_file}\n")
50-
modules = find_modules(package_name)
51-
base_modules = [mod for mod in sorted(set(module.rsplit(".", 1)[0] for module in modules)) if mod != package_name]
50+
modules = [module for module in find_modules(package_name) if ".devtools." not in module]
51+
base_modules = [mod for mod in sorted({module.rsplit(".", 1)[0] for module in modules}) if mod != package_name]
5252
print("found sections:")
5353
for base_module in base_modules:
5454
print(f" {base_module}")

py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ classifiers = [
2525
"Programming Language :: Python :: 3.13",
2626
]
2727
dependencies = [
28-
"urllib3[socks]~=2.4.0",
28+
"urllib3[socks]~=2.5.0",
2929
"trio~=0.30.0",
3030
"trio-websocket~=0.12.2",
31-
"certifi>=2025.4.26",
31+
"certifi>=2025.6.15",
3232
"typing_extensions~=4.14.0",
3333
"websocket-client~=1.8.0",
3434
]

py/requirements.txt

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
async-generator==1.10
21
attrs==25.3.0
3-
cachetools==6.0.0
4-
certifi==2025.4.26
2+
cachetools==6.1.0
3+
certifi==2025.6.15
54
cffi==1.17.1
65
chardet==5.2.0
76
charset-normalizer==3.4.2
87
colorama==0.4.6
9-
cryptography==45.0.3
8+
cryptography==45.0.4
109
debugpy==1.8.14
1110
distlib==0.3.9
1211
docutils==0.21.2
@@ -26,7 +25,7 @@ keyring==25.6.0
2625
markdown-it-py==3.0.0
2726
mdurl==0.1.2
2827
more-itertools==10.7.0
29-
multidict==6.4.4
28+
multidict==6.5.0
3029
nh3==0.2.21
3130
outcome==1.3.0.post0
3231
packaging==25.0
@@ -35,30 +34,28 @@ pluggy==1.6.0
3534
py==1.11.0
3635
pycparser==2.22
3736
Pygments==2.19.1
38-
pyOpenSSL==25.1.0
39-
pyparsing==3.2.3
4037
pyproject-api==1.9.1
4138
PySocks==1.7.1
42-
pytest==8.4.0
39+
pytest==8.4.1
4340
pytest-instafail==0.5.0
4441
pytest-mock==3.14.1
4542
pytest-trio==0.8.0
43+
pywin32-ctypes==0.2.3
4644
readme_renderer==44.0
47-
requests==2.32.3
45+
requests==2.32.4
4846
requests-toolbelt==1.0.0
4947
rfc3986==2.0.0
5048
rich==14.0.0
5149
SecretStorage==3.3.3
5250
sniffio==1.3.1
5351
sortedcontainers==2.4.0
54-
toml==0.10.2
55-
tox==4.26.0
52+
tox==4.27.0
5653
trio==0.30.0
5754
trio-websocket==0.12.2
5855
twine==6.1.0
5956
typing_extensions==4.14.0
60-
urllib3[socks]==2.4.0
57+
urllib3[socks]==2.5.0
6158
virtualenv==20.31.2
6259
websocket-client==1.8.0
6360
wsproto==1.2.0
64-
zipp==3.22.0
61+
zipp==3.23.0

0 commit comments

Comments
 (0)