Skip to content

Commit e8ce574

Browse files
authored
Merge branch 'trunk' into dotnet_service_log_to_console
2 parents 72d12cd + 7a35455 commit e8ce574

File tree

8 files changed

+71
-24
lines changed

8 files changed

+71
-24
lines changed

dotnet/src/webdriver/BiDi/Network/Cookie.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ public enum SameSite
3232
{
3333
Strict,
3434
Lax,
35-
None
35+
None,
36+
Default
3637
}

dotnet/src/webdriver/Chromium/ChromiumDriverService.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ protected ChromiumDriverService(string? executablePath, string? executableFileNa
9595
/// </summary>
9696
public string? AllowedIPAddresses { get; set; }
9797

98+
/// <summary>
99+
/// Adds readable timestamps to log
100+
/// </summary>
101+
public bool ReadableTimestamp { get; set; }
102+
98103
/// <summary>
99104
/// Gets the command-line arguments for the driver service.
100105
/// </summary>
@@ -128,6 +133,11 @@ protected override string CommandLineArguments
128133
argsBuilder.Append(" --append-log");
129134
}
130135

136+
if (this.ReadableTimestamp)
137+
{
138+
argsBuilder.Append(" --readable-timestamp");
139+
}
140+
131141
if (!string.IsNullOrEmpty(this.LogPath))
132142
{
133143
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --log-path=\"{0}\"", this.LogPath);

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ protected override DriverOptions GetDefaultDriverOptions()
105105
/// </remarks>
106106
public string? LogPath { get; set; }
107107

108+
/// <summary>
109+
/// Disable truncation of long log lines in GeckoDriver.
110+
/// </summary>
111+
public bool LogNoTruncate { get; set; }
112+
113+
/// <summary>
114+
/// Directory in which GeckoDriver creates profiles.
115+
/// </summary>
116+
public string? ProfileRoot { get; set; }
117+
108118
/// <summary>
109119
/// Gets or sets the level at which log output is displayed.
110120
/// </summary>
@@ -191,6 +201,21 @@ protected override string CommandLineArguments
191201
argsBuilder.Append(" --jsdebugger");
192202
}
193203

204+
if (this.LogNoTruncate)
205+
{
206+
argsBuilder.Append(" --log-no-truncate");
207+
}
208+
209+
if (!string.IsNullOrEmpty(this.ProfileRoot))
210+
{
211+
if (!Directory.Exists(this.ProfileRoot))
212+
{
213+
throw new ArgumentException($"Profile root directory does not exist: {this.ProfileRoot}", nameof(ProfileRoot));
214+
}
215+
216+
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --profile-root \"{0}\"", this.ProfileRoot);
217+
}
218+
194219
return argsBuilder.ToString().Trim();
195220
}
196221
}

java/src/org/openqa/selenium/bidi/network/Cookie.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public class Cookie {
2525
public enum SameSite {
2626
STRICT("strict"),
2727
LAX("lax"),
28-
NONE("none");
28+
NONE("none"),
29+
DEFAULT("default");
2930

3031
private final String type;
3132

javascript/selenium-webdriver/bidi/networkTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const SameSite = {
2626
STRICT: 'strict',
2727
LAX: 'lax',
2828
NONE: 'none',
29+
DEFAULT: 'default',
2930

3031
findByName(name) {
3132
return (

javascript/selenium-webdriver/test/fedcm/fedcm_test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
const assert = require('node:assert')
2121
const { Browser } = require('selenium-webdriver')
22-
const { Pages, suite } = require('../../lib/test')
22+
const { ignore, Pages, suite } = require('../../lib/test')
2323
const { By } = require('selenium-webdriver/index')
2424

2525
suite(
@@ -34,7 +34,8 @@ suite(
3434
await driver.quit()
3535
})
3636

37-
describe('Federated Credential Management Test', function () {
37+
// Failing due to - https://issues.chromium.org/u/0/issues/425801332, enable when Chrome 140 is released
38+
ignore(env.browsers(Browser.CHROME, Browser.EDGE)).describe('Federated Credential Management Test', function () {
3839
it('credential management dialog should appear', async function () {
3940
await driver.get(Pages.fedcm)
4041

py/docs/source/index.rst

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,32 @@ Several browsers are supported, as well as the Remote protocol:
4747
Installing
4848
==========
4949

50-
If you have `pip <https://pip.pypa.io/>`_ on your system, you can simply install or upgrade the Python bindings::
50+
Install or upgrade the Python bindings with `pip <https://pip.pypa.io/>`.
51+
52+
Latest official release::
5153

5254
pip install -U selenium
5355

54-
You may want to consider using a `virtual environment <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments>`_
55-
to create isolated Python environments.
56+
Nightly development release::
57+
58+
pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ selenium
59+
60+
Note: you should consider using a
61+
`virtual environment <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments>`_
62+
to create an isolated Python environment for installation.
5663

5764
Drivers
5865
=======
5966

6067
Selenium requires a driver to interface with the chosen browser (chromedriver, edgedriver, geckodriver, etc).
6168

62-
In older versions of Selenium, it was necessary to install and manage these drivers yourself. You had to make sure the driver
63-
executable was available on your system `PATH`, or specified explicitly in code. Modern versions of Selenium handle browser and
64-
driver installation for you with `Selenium Manager <https://www.selenium.dev/documentation/selenium_manager>`_. You generally
65-
don't have to worry about driver installation or configuration now that it's done for you when you instantiate a WebDriver.
66-
Selenium Manager works with most supported platforms and browsers. If it doesn't meet your needs, you can still install and
67-
specify browsers and drivers yourself.
69+
In older versions of Selenium, it was necessary to install and manage these drivers yourself. You had to make sure the
70+
driver executable was available on your system `PATH`, or specified explicitly in code. Modern versions of Selenium
71+
handle browser and driver installation for you with
72+
`Selenium Manager <https://www.selenium.dev/documentation/selenium_manager>`_. You generally don't have to worry about
73+
driver installation or configuration now that it's done for you when you instantiate a WebDriver. Selenium Manager works
74+
with most supported platforms and browsers. If it doesn't meet your needs, you can still install and specify browsers
75+
and drivers yourself.
6876

6977
Links to some of the more popular browser drivers:
7078

@@ -123,8 +131,8 @@ Example 1:
123131
Example 2:
124132
==========
125133

126-
Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example using Python's standard
127-
`unittest <http://docs.python.org/3/library/unittest.html>`_ library:
134+
Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example using Python's
135+
standard `unittest <http://docs.python.org/3/library/unittest.html>`_ library:
128136

129137
.. code-block:: python
130138
@@ -150,8 +158,8 @@ Selenium Grid (optional)
150158

151159
For local Selenium scripts, the Java server is not needed.
152160

153-
To use Selenium remotely, you need to also run the Selenium grid.
154-
For information on running Selenium Grid: https://www.selenium.dev/documentation/grid/getting_started/
161+
To use Selenium remotely, you need to also run a Selenium Grid. For information on running Selenium Grid:
162+
https://www.selenium.dev/documentation/grid/getting_started/
155163

156164
To use Remote WebDriver see: https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/?tab=python
157165

@@ -167,15 +175,14 @@ View source code online:
167175
Contributing
168176
=============
169177

170-
- Fork the selenium repo and clone it locally
178+
- Fork the selenium repo
179+
- Clone your fork locally
171180
- Create a branch for your work
172-
- Run: `git checkout -b my-cool-branch-name`
181+
- `git checkout -b my-cool-branch-name`
173182
- Create a virtual environment and install tox
174-
- Run: `python -m venv venv && source venv/bin/activate && pip install tox`
183+
- `python -m venv venv && source venv/bin/activate && pip install tox`
175184
- Make your changes
176-
- Run: `tox -e linting`
185+
- Run the linter/formatter
186+
- `tox -e linting`
177187
- If tox exits `0`, commit and push. Otherwise, fix the newly introduced style violations
178-
- `flake8` requires manual fixes
179-
- `black` will rewrite the violations automatically, however the files are unstaged and should be staged again
180-
- `isort` will rewrite the violations automatically, however the files are unstaged and should be staged again
181188
- Submit a Pull Request

py/selenium/webdriver/common/bidi/storage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class SameSite:
2626
STRICT = "strict"
2727
LAX = "lax"
2828
NONE = "none"
29+
DEFAULT = "default"
2930

3031

3132
class BytesValue:

0 commit comments

Comments
 (0)