Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
bc13665
[bazel] Update to Bazel 8
shs96c Dec 19, 2025
2589837
Run formatter
shs96c Dec 22, 2025
92ad524
Move to a prebuilt protoc
shs96c Dec 22, 2025
4f7cb49
Use a version of `rules_java` which has now warnings about `sun.misc.…
shs96c Dec 22, 2025
52b8bd3
Add missing minimatch dep, which is causing Windows builds to fail
shs96c Dec 22, 2025
b04c446
cp: Attempt to fix missing `minimatch` dependency on Windows
shs96c Dec 23, 2025
c18b795
Attempt to work around Windows build problem
shs96c Jan 12, 2026
ab00706
[bazel]: Bump to Bazel 8.5.1
shs96c Jan 19, 2026
a96feb0
Attempt to work around more failing windows builds
shs96c Jan 19, 2026
09ffc61
Also add `balanced-match`
shs96c Jan 19, 2026
41b5b9d
Try another approach to resolve the missing dependencies on Windows
shs96c Jan 19, 2026
49cf48c
And back to minimatch too
shs96c Jan 19, 2026
3f77ef8
Adding back the data deps
shs96c Jan 19, 2026
b4edd9e
Downgrade Bazel to 8.5.0 as the tests seemed to pass then
shs96c Jan 19, 2026
31aa8bc
[bazel] Bump to Bazel 9
shs96c Jan 28, 2026
aa44a5b
Bump to latest versions of bazel deps
shs96c Feb 16, 2026
0ecbc41
Update lock file
shs96c Feb 16, 2026
893996e
Generate closure deps using python
shs96c Feb 16, 2026
8b7a07c
Continue tinkering with Windows builds
shs96c Feb 17, 2026
649283c
Remove flag that doesn't exit
shs96c Feb 17, 2026
fe6e629
Run format
shs96c Feb 17, 2026
bf58e53
Downgrade to bazel 8.5.1 to see if that helps Windows builds
shs96c Feb 23, 2026
f010c5b
Add back a flag that exists in bazel 8
shs96c Feb 23, 2026
52d99a1
Revert "Add back a flag that exists in bazel 8"
shs96c Feb 25, 2026
96e5efe
Revert "Downgrade to bazel 8.5.1 to see if that helps Windows builds"
shs96c Feb 25, 2026
43d8c59
Fix up rules_jest so the tests run again
shs96c Feb 25, 2026
cedc71f
Fix up lint errors
shs96c Feb 25, 2026
591aad7
Attempt to fix ruby tests by better handling of rlocation paths
shs96c Feb 25, 2026
9bc96c8
Fix up linting error
shs96c Feb 25, 2026
e8a70ac
Do not replace the ruby version
shs96c Feb 25, 2026
b5ee9c9
Put back legacy runfiles flag
shs96c Feb 25, 2026
2868ee0
Get Ruby tests working
shs96c Feb 26, 2026
60be30e
Fix build issue with python code
shs96c Feb 26, 2026
c38c0d9
Attempt to get the python tests passing
shs96c Feb 26, 2026
6c792de
Another fix for python
shs96c Feb 26, 2026
a5ad11a
More test stability work
shs96c Feb 26, 2026
01d90f0
Brute force tests to pass
shs96c Feb 26, 2026
f5a18a3
Update build files
shs96c Feb 26, 2026
e46d4d7
Fix linting error
shs96c Feb 26, 2026
1afcb9d
Rebase, bump deps, and bump bazel version
shs96c Mar 14, 2026
84ec40c
Repin cargo lock file
shs96c Mar 14, 2026
30ecfd2
Attempt to fix issue with paths
shs96c Mar 14, 2026
e32ac6e
Fix up python tests
shs96c Mar 14, 2026
5e4cfbe
Fix spotbugs failures
shs96c Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ java/client/build
java/server/build
javascript/atoms/node_modules
javascript/grid-ui/node_modules
javascript/private/node_modules
javascript/selenium-webdriver/node_modules
node_modules
.local
25 changes: 13 additions & 12 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,23 @@ try-import %workspace%/.bazelrc.windows.local

common --lockfile_mode=off

# Prepare for Bazel 8. These become the default in 8.0.0
common --incompatible_disallow_empty_glob
common --incompatible_use_plus_in_repo_names
# Bazel 8 compatibility flags. We should find ways to avoid needing these
common --legacy_external_runfiles

# Ensure Windows support is accurate.

startup --windows_enable_symlinks
build --enable_runfiles

build --flag_alias=pin_browsers=//common:pin_browsers
build --flag_alias=headless=//common:headless

# Set the default java toolchain

build --java_language_version=21
build --java_runtime_version=remotejdk_21
build --tool_java_language_version=21
build --tool_java_runtime_version=remotejdk_21

# We target java 11 by default

build --javacopt="--release 11"

# Require java dependencies to be used and first-order
Expand All @@ -45,7 +41,7 @@ build --javacopt="-Xep:WildcardImport:ERROR"
build --nobuild_runfile_links

# More JS magic
build --experimental_allow_unresolved_symlinks
build --allow_unresolved_symlinks
# Avoid a warning about directory tracking being unsound
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

Expand All @@ -62,7 +58,17 @@ query --@aspect_rules_ts//ts:default_to_tsc_transpiler

build --incompatible_strict_action_env

# Required for prebuilt protoc to be used
common --@protobuf//bazel/toolchains:prefer_prebuilt_protoc=true

# Ensure that we don't accidentally build protobuf or gRPC
common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT

# Required to get `protobuf` compiling, which is required for `rules_closure`
common --incompatible_enable_proto_toolchain_resolution
build --incompatible_enable_cc_toolchain_resolution
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
Expand All @@ -75,19 +81,16 @@ build:windows --host_per_file_copt=external/protobuf\\+.*@/w
common --define=protobuf_allow_msvc=true

# For build stamping

build --enable_platform_specific_config
build:linux --workspace_status_command=scripts/build-info.sh
build:macos --workspace_status_command=scripts/build-info.sh
build:windows --workspace_status_command="powershell.exe scripts/build-info.ps1"

# Make sure we get something helpful when tests fail

build --verbose_failures
build --test_output=errors

# pass environment variables to the test environment

test --test_env=CI
test --test_env=DASHBOARD_URL
test --test_env=DISPLAY
Expand All @@ -99,7 +102,6 @@ test --test_env=PYTHON_VERSION
test --test_env=SE_AVOID_STATS=true

# Remove once rules_ruby support proper $LOAD_PATH expansion.

test --test_env=RUBYOPT="-Irb/lib -w"

# Speed up JRuby startup.
Expand All @@ -109,7 +111,6 @@ build --action_env=JRUBY_OPTS="--dev"
test --test_env=JRUBY_OPTS="--dev"

# Expose necessary variables for Selenium-Manager.

test:windows --test_env=PATH
test:windows --test_env=LOCALAPPDATA
test:windows --test_env=PROCESSOR_ARCHITECTURE
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
9.0.1
20 changes: 20 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@package_metadata//licenses/rules:license.bzl", "license")
load("@package_metadata//rules:package_metadata.bzl", "package_metadata")
load("//common:browsers.bzl", "chrome_data", "firefox_data")
load("//java:browsers.bzl", "chrome_jvm_flags", "firefox_jvm_flags")
load("//java:defs.bzl", "artifact", "java_binary")
Expand All @@ -21,6 +23,24 @@ filegroup(
visibility = ["//visibility:public"],
)

package_metadata(
name = "package_metadata",
attributes = [
":apache2",
],
purl = "pkg:bazel/{}@{}".format(
module_name(),
module_version(),
) if module_version() else "pkg:bazel/{}".format(module_name()),
visibility = ["//visibility:public"],
)

license(
name = "apache2",
kind = "@package_metadata//licenses/spdx:Apache-2.0",
text = "LICENSE",
)

filegroup(
name = "rakefile",
srcs = [
Expand Down
67 changes: 42 additions & 25 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,37 +1,55 @@
module(name = "selenium")

bazel_dep(name = "apple_rules_lint", version = "0.4.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0")
bazel_dep(name = "aspect_rules_esbuild", version = "0.21.0")
bazel_dep(name = "aspect_rules_jest", version = "0.24.3")
bazel_dep(name = "aspect_rules_js", version = "2.3.7")
bazel_dep(name = "aspect_rules_ts", version = "3.6.0")
bazel_dep(name = "bazel_features", version = "1.32.0")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
bazel_dep(name = "aspect_rules_esbuild", version = "0.25.1")
bazel_dep(name = "aspect_rules_jest", version = "0.25.2")
bazel_dep(name = "aspect_rules_js", version = "3.0.3")
bazel_dep(name = "aspect_rules_ts", version = "3.8.6")
bazel_dep(name = "bazel_features", version = "1.43.0")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1")
bazel_dep(name = "contrib_rules_jvm", version = "0.32.0")
bazel_dep(name = "package_metadata", version = "0.0.7")
bazel_dep(name = "platforms", version = "1.0.0")

# If you update this, also update the prebuilt version of `protoc` we use below
bazel_dep(name = "protobuf", version = "33.5")

# Required for rules_rust to import the crates properly
bazel_dep(name = "rules_cc", version = "0.2.8", dev_dependency = True)
bazel_dep(name = "rules_cc", version = "0.2.17", dev_dependency = True)

bazel_dep(name = "rules_android", version = "0.7.1")
bazel_dep(name = "rules_closure", version = "0.15.0")
bazel_dep(name = "rules_dotnet", version = "0.20.5")
bazel_dep(name = "rules_java", version = "8.7.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_multitool", version = "1.3.0")
bazel_dep(name = "rules_nodejs", version = "6.3.2")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "1.8.3")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "rules_ruby", version = "0.22.1")
bazel_dep(name = "rules_rust", version = "0.67.0")

# Until `rules_jvm_external` 6.8 ships
bazel_dep(name = "rules_dotnet", version = "0.21.5")

# See below for actual version used
bazel_dep(name = "rules_java", version = "9.6.1")
bazel_dep(name = "rules_jvm_external", version = "6.10")
bazel_dep(name = "rules_multitool", version = "1.11.1")
bazel_dep(name = "rules_nodejs", version = "6.7.3")
bazel_dep(name = "rules_oci", version = "2.3.0")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_python", version = "1.9.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_ruby", version = "0.23.1")
bazel_dep(name = "rules_rust", version = "0.69.0")

# Use latest rules_jvm_external for Bazel 9 compatibility
single_version_override(
module_name = "rules_jvm_external",
patch_strip = 1,
patches = ["//java:rules_jvm_external_javadoc.patch"],
patches = ["//third_party/bazel:rules_jvm_external_javadoc.patch"],
)

# aspect_rules_jest 0.25.2 does not declare bazel_lib 3.x as a dep
# (aspect_bazel_lib → bazel_lib rename)
single_version_override(
module_name = "aspect_rules_jest",
patch_strip = 1,
patches = [
"//third_party/bazel:aspect_rules_jest_bazel_lib.patch",
],
)

multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
Expand Down Expand Up @@ -65,15 +83,13 @@ npm.npm_translate_lock(
data = [
"@//:package.json",
"@//:pnpm-workspace.yaml",
"@//javascript/atoms:package.json",
"@//javascript/grid-ui:package.json",
"@//javascript/private:package.json",
"@//javascript/selenium-webdriver:package.json",
],
generate_bzl_library_targets = True,
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
update_pnpm_lock = True,
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
Expand Down Expand Up @@ -239,6 +255,7 @@ maven.install(
fail_on_missing_checksum = True,
fetch_sources = True,
known_contributing_modules = [
"protobuf",
"rules_closure",
"rules_web_testing_java",
"selenium",
Expand Down
7 changes: 7 additions & 0 deletions REPO.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repo(
default_package_metadata = [
"//:package_metadata",
],
)

ignore_directories(["**/node_modules"])
2 changes: 1 addition & 1 deletion common/remote-build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ platform(
"dockerUseEntrypoint": "True",
"sandboxAllowed": "False",
},
parents = ["@local_config_platform//:host"],
parents = ["@platforms//host"],
)
1 change: 1 addition & 0 deletions common/remote-build/cc/armeabi_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ load(
"tool_path",
)
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
load("@rules_cc//cc/private/toolchain_config:cc_toolchain_config_info.bzl", "CcToolchainConfigInfo")

def _impl(ctx):
toolchain_identifier = "stub_armeabi-v7a"
Expand Down
1 change: 1 addition & 0 deletions common/remote-build/cc/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ load(
"with_feature_set",
)
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
load("@rules_cc//cc/private/toolchain_config:cc_toolchain_config_info.bzl", "CcToolchainConfigInfo")

def layering_check_features(compiler):
if compiler != "clang":
Expand Down
4 changes: 2 additions & 2 deletions java/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ load("//java/private:module.bzl", _java_module = "java_module")
load("//java/private:selenium_test.bzl", _selenium_test = "selenium_test")
load("//java/private:suite.bzl", _java_selenium_test_suite = "java_selenium_test_suite")

def java_test_suite(name, runner = "junit5", **kwargs):
_java_test_suite(name = name, runner = runner, **kwargs)
def java_test_suite(name, **kwargs):
_java_test_suite(name = name, **kwargs)

SINGLE_BROWSER = ["chrome"]

Expand Down
Loading
Loading