Skip to content

Commit 950c809

Browse files
authored
Merge branch 'trunk' into add-default-cookie-type
2 parents 13f00a9 + 2ab802b commit 950c809

File tree

3 files changed

+62
-20
lines changed

3 files changed

+62
-20
lines changed

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
@@ -103,6 +103,16 @@ protected override DriverOptions GetDefaultDriverOptions()
103103
/// </remarks>
104104
public string? LogPath { get; set; }
105105

106+
/// <summary>
107+
/// Disable truncation of long log lines in GeckoDriver.
108+
/// </summary>
109+
public bool LogNoTruncate { get; set; }
110+
111+
/// <summary>
112+
/// Directory in which GeckoDriver creates profiles.
113+
/// </summary>
114+
public string? ProfileRoot { get; set; }
115+
106116
/// <summary>
107117
/// Gets or sets the level at which log output is displayed.
108118
/// </summary>
@@ -189,6 +199,21 @@ protected override string CommandLineArguments
189199
argsBuilder.Append(" --jsdebugger");
190200
}
191201

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

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

0 commit comments

Comments
 (0)