Skip to content

Commit 9286832

Browse files
authored
Merge branch 'trunk' into jspecify-remote3
2 parents 98754f5 + 4428c25 commit 9286832

File tree

151 files changed

+12163
-11840
lines changed

Some content is hidden

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

151 files changed

+12163
-11840
lines changed

.bazelrc.remote

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ build:rbe --disk_cache=
3131
build:rbe --incompatible_enable_cc_toolchain_resolution
3232
build:rbe --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
3333
test:rbe --test_env=DISPLAY=:99.0
34-
test:rbe --test_tag_filters=-skip-rbe,-remote
34+
test:rbe --test_tag_filters=-skip-rbe
3535

3636
# Env vars we can hard code
3737
build:rbe --action_env=HOME=/home/dev

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ body:
5050
id: selenium-version
5151
attributes:
5252
label: What version of Selenium are you currently using?
53-
description: Important! The latest released version of Selenium is 4.37 and we can't fix old versions.
53+
description: Important! The latest released version of Selenium is 4.38 and we can't fix old versions.
5454
placeholder: e.g., 4.17.0
5555
validations:
5656
required: true

.github/workflows/update-documentation.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ on:
4141
SELENIUM_CI_TOKEN:
4242
required: true
4343

44+
permissions:
45+
contents: write
46+
pull-requests: write
47+
4448
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
GITHUB_TOKEN: ${{ github.token }}
4650

4751
jobs:
4852
build-docs:

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ Eric Plaster <[email protected]>
285285
Erik Beans <[email protected]>
286286
Erik E. Beerepoot <[email protected]>
287287
Erik Kuefler <[email protected]>
288+
288289
Evan Sangaline <[email protected]>
289290
Evgeniy Roldukhin <[email protected]>
290291

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ maven.install(
175175
"com.beust:jcommander:1.82",
176176
"org.checkerframework:checker-qual:3.51.1",
177177
"com.github.javaparser:javaparser-core:3.27.1",
178-
"com.github.spotbugs:spotbugs:4.9.7",
178+
"com.github.spotbugs:spotbugs:4.9.8",
179179
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
180180
"com.google.code.findbugs:jsr305:3.0.2",
181181
"com.google.code.gson:gson:2.13.2",
@@ -191,7 +191,7 @@ maven.install(
191191
"com.uber.nullaway:nullaway:0.12.10",
192192
"dev.failsafe:failsafe:3.3.2",
193193
"io.grpc:grpc-context:1.76.0",
194-
"io.lettuce:lettuce-core:6.8.1.RELEASE",
194+
"io.lettuce:lettuce-core:7.0.0.RELEASE",
195195
"io.netty:netty-buffer",
196196
"io.netty:netty-codec-http",
197197
"io.netty:netty-codec-http2",

README.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ get stuck, there are several ways to [Get Help](https://www.selenium.dev/support
4343
Please read [CONTRIBUTING.md](https://github.com/SeleniumHQ/selenium/blob/trunk/CONTRIBUTING.md)
4444
before submitting your pull requests.
4545

46-
4746
## Installing
4847

4948
These are the requirements to create your own local dev environment to contribute to Selenium.
5049

5150
### All Platforms
51+
5252
* [Bazelisk](https://github.com/bazelbuild/bazelisk), a Bazel wrapper that automatically downloads
5353
the version of Bazel specified in `.bazelversion` file and transparently passes through all
5454
command-line arguments to the real Bazel binary.
@@ -58,11 +58,13 @@ These are the requirements to create your own local dev environment to contribut
5858
installed. If you're met with a list of command-line options, you're referencing the JDK properly.
5959

6060
### MacOS
61+
6162
* Xcode including the command-line tools. Install the latest version using: `xcode-select --install`
6263
* Rosetta for Apple Silicon Macs. Add `build --host_platform=//:rosetta` to the `.bazelrc.local` file. We are working
6364
to make sure this isn't required in the long run.
6465

6566
### Windows
67+
6668
Several years ago [Jim Evans](https://www.linkedin.com/in/jimevansmusic/) published a great article on
6769
[Setting Up a Windows Development Environment for the Selenium .NET Language Bindings](https://jimevansmusic.blogspot.com/2020/04/setting-up-windows-development.html);
6870
This article is out of date, but it includes more detailed descriptions and screenshots that some people might find useful.
@@ -71,6 +73,7 @@ This article is out of date, but it includes more detailed descriptions and scre
7173
<summary>Click to see Current Windows Setup Requirements</summary>
7274

7375
#### Option 1: Automatic Installation from Scratch
76+
7477
This script will ensure a complete ready to execute developer environment.
7578
(nothing is installed or set that is already present unless otherwise prompted)
7679

@@ -80,6 +83,7 @@ This script will ensure a complete ready to execute developer environment.
8083
4. Download and execute this script in the powershell terminal: [scripts/dev-environment-setup.ps1]`
8184

8285
#### Option 2: Manual Installation
86+
8387
1. Allow running scripts in Selenium in general:
8488
```
8589
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
@@ -158,26 +162,29 @@ The Bazel documentation has a [handy guide](https://bazel.build/run/build#specif
158162
for various shortcuts and all the ways to build multiple targets, which Selenium makes frequent use of.
159163
160164
To build everything for a given language:
165+
161166
```shell
162167
bazel build //<language>/...
163168
```
164169

165170
To build just the grid there is an alias name to use (the log will show where the output jar is located):
166-
```sh
171+
172+
```shell
167173
bazel build grid
168174
```
169175

170-
To make things more simple, building each of the bindings is available with this `./go` command
176+
To make things more simple, building each of the bindings is available with this `./go` command:
177+
171178
```shell
172179
./go <language>:build
173180
```
174181

175-
176182
## Developing
177183

178184
### Java
179185

180186
#### IntelliJ
187+
181188
Most of the team uses Intellij for their day-to-day editing. If you're
182189
working in IntelliJ, then we highly recommend installing the [Bazel IJ
183190
plugin](https://plugins.jetbrains.com/plugin/8609-bazel) which is documented on
@@ -187,13 +194,16 @@ To use Selenium with the IntelliJ Bazel plugin, import the repository as a Bazel
187194
view file from the [scripts](scripts) directory. `ij.bazelproject` for Mac/Linux and `ij-win.bazelproject` for Windows.
188195

189196
#### Linting
197+
190198
We also use Google Java Format for linting, so using the Google Java Formatter Plugin is useful;
191199
there are a few steps to get it working, so read their [configuration documentation](https://github.com/google/google-java-format/blob/master/README.md#intellij-jre-config).
192200
There is also an auto-formatting script that can be run: `./scripts/format.sh`
193201

194202
#### Local Installation
203+
195204
While Selenium is not built with Maven, you can build and install the Selenium pieces
196205
for Maven to use locally by deploying to your local maven repository (`~/.m2/repository`), using:
206+
197207
```shell
198208
./go java:install
199209
```
@@ -225,18 +235,21 @@ There is also an auto-formatting script that can be run: `./scripts/format.sh`
225235
#### Local Installation
226236

227237
To run Python code locally without building/installing the package, you must first install the dependencies:
238+
228239
```shell
229240
pip install -r py/requirements.txt
230241
```
231242

232243
Then, build the generated files and copy them into your local source tree:
244+
233245
```shell
234246
./go py:local_dev
235247
```
236248

237249
After that, you can import the selenium package directly from source from the `py` directory.
238250

239251
Instead of running from source, you can build and install the selenium package (wheel) locally:
252+
240253
```shell
241254
./go py:install
242255
```
@@ -252,11 +265,12 @@ before installing.
252265
Instead of using `irb`, you can create an interactive REPL with all gems loaded using: `bazel run //rb:console`
253266

254267
If you want to debug code, you can do it via [`debug`](https://github.com/ruby/debug) gem:
268+
255269
1. Add `binding.break` to the code where you want the debugger to start.
256270
2. Run tests with `ruby_debug` configuration: `bazel test --config ruby_debug <test>`.
257271
3. When debugger starts, run the following in a separate terminal to connect to debugger:
258272

259-
```sh
273+
```shell
260274
bazel-selenium/external/bundle/bin/rdbg -A
261275
```
262276

@@ -270,12 +284,12 @@ you can configure it use Bazel artifacts:
270284

271285
### Rust
272286

273-
To keep `Carbo.Bazel.lock` synchronized with `Cargo.lock`, run:
287+
To keep `Cargo.Bazel.lock` synchronized with `Cargo.lock`, run:
288+
274289
```shell
275290
CARGO_BAZEL_REPIN=true bazel sync --only=crates
276291
```
277292

278-
279293
## Testing
280294

281295
There are a number of bazel configurations specific for testing.
@@ -301,12 +315,14 @@ Selenium tests can be filtered by size:
301315
* medium — tests that are more involved than simple unit tests, but not fully driving a browser
302316

303317
These can be filtered using the `test_size_filters` argument like this:
304-
```sh
318+
319+
```shell
305320
bazel test //<language>/... --test_size_filters=small
306321
```
307322

308323
Tests can also be filtered by tag like:
309-
```sh
324+
325+
```shell
310326
bazel test //<language>/... --test_tag_filters=this,-not-this
311327
```
312328

@@ -319,44 +335,50 @@ so be careful if also using an inherited config
319335
<summary>Click to see Java Test Commands</summary>
320336

321337
To run unit tests:
338+
322339
```shell
323340
bazel test //java/... --test_size_filters=small
324341
```
325342
To run integration tests:
343+
326344
```shell
327345
bazel test //java/... --test_size_filters=medium
328346
```
329347
To run browser tests:
348+
330349
```shell
331350
bazel test //java/... --test_size_filters=large --test_tag_filters=<browser>
332351
```
333352

334353
To run a specific test:
354+
335355
```shell
336356
bazel test //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest
337357
```
338358

339359
</details>
340360

341361
### JavaScript
362+
342363
<details>
343364
<summary>Click to see JavaScript Test Commands</summary>
344365

345366
To run the tests run:
346367

347-
```sh
368+
```shell
348369
bazel test //javascript/selenium-webdriver:all
349370
```
350371

351372
You can use `--test_env` to pass in the browser name as `SELENIUM_BROWSER`.
352373

353-
```sh
374+
```shell
354375
bazel test //javascript/selenium-webdriver:all --test_env=SELENIUM_BROWSER=firefox
355376
```
356377

357378
</details>
358379

359380
### Python
381+
360382
<details>
361383
<summary>Click to see Python Test Commands</summary>
362384

@@ -367,30 +389,32 @@ bazel test //py:unit
367389

368390
To run common tests with a specific browser:
369391

370-
```sh
392+
```shell
371393
bazel test //py:common-<browsername>
372394
```
373395

374396
To run common tests with a specific browser (include BiDi tests):
375397

376-
```sh
398+
```shell
377399
bazel test //py:common-<browsername>-bidi
378400
```
379401

380402
To run tests with a specific browser:
381403

382-
```sh
404+
```shell
383405
bazel test //py:test-<browsername>
384406
```
385407

386408
To run all Python tests:
409+
387410
```shell
388411
bazel test //py:all
389412
```
390413

391414
</details>
392415

393416
### Ruby
417+
394418
<details>
395419
<summary>Click to see Ruby Test Commands</summary>
396420

@@ -452,35 +476,40 @@ Supported environment variables for use with `--test_env`:
452476

453477
To run with a specific version of Ruby you can change the version in `rb/.ruby-version` or from command line:
454478

455-
```sh
479+
```shell
456480
echo '<X.Y.Z>' > rb/.ruby-version
457481
```
458482
</details>
459483

460484
### .NET
485+
461486
<details>
462487
<summary>Click to see .NET Test Commands</summary>
463488

464489
.NET tests currently only work with pinned browsers, so make sure to include that.
465490

466491
Run all tests with:
467-
```sh
492+
493+
```shell
468494
bazel test //dotnet/test/common:AllTests --pin_browsers=true
469495
```
470496

471497
You can run specific tests by specifying the class name:
498+
472499
```shell
473500
bazel test //dotnet/test/common:ElementFindingTest --pin_browsers=true
474501
```
475502

476503
If the module supports multiple browsers:
504+
477505
```shell
478506
bazel test //dotnet/test/common:ElementFindingTest-edge --pin_browsers=true
479507
```
480508

481509
</details>
482510

483511
### Rust
512+
484513
<details>
485514
<summary>Click to see Rust Test Commands</summary>
486515

@@ -502,12 +531,14 @@ alternatively run them in a virtual or nested X-server.
502531
1. Run the X server `Xvfb :99` or `Xnest :99`
503532
2. Run a window manager, for example, `DISPLAY=:99 jwm`
504533
3. Run the tests you are interested in:
505-
```sh
534+
535+
```shell
506536
bazel test --test_env=DISPLAY=:99 //java/... --test_tag_filters=chrome
507537
```
508538

509539
An easy way to run tests in a virtual X-server is to use Bazel's `--run_under`
510540
functionality:
541+
511542
```
512543
bazel test --run_under="xvfb-run -a" //java/...
513544
```
@@ -539,16 +570,19 @@ As discussed in the [Building](#building) section, we use Rake tasks with the `.
539570
These `./go` commands include the `--stamp` argument to provide necessary information about the constructed asset.
540571

541572
You can build and release everything with:
573+
542574
```shell
543575
./go all:release
544576
```
545577

546578
To build and release a specific language:
579+
547580
```shell
548581
./go <language>:release
549582
```
550583

551584
If you have access to the Selenium EngFlow repository, you can have the assets built remotely and downloaded locally using:
585+
552586
```shell
553587
./go all:release['--config', 'release']
554588
```

0 commit comments

Comments
 (0)