Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ py_library(
visibility = ["//visibility:public"],
deps = [
":bidi",
":bidi_protocol",
":chrome",
":chromium",
":common",
Expand Down Expand Up @@ -561,6 +562,7 @@ py_package(
"py.selenium",
"py.selenium.common",
"py.selenium.webdriver",
"py.selenium.webdriver._bidi",
"py.selenium.webdriver.chrome",
"py.selenium.webdriver.chromium",
"py.selenium.webdriver.common",
Expand Down Expand Up @@ -748,6 +750,27 @@ generate_bidi(
spec_version = "1.0",
)

# Schema-driven BiDi protocol layer (ADR 17701): generated from the shared BiDi
# schema into the internal `selenium/webdriver/_bidi/` package. The files are
# checked in here only so the generated output's shape is reviewable; the final
# PR will generate them at build time rather than commit them.
py_binary(
name = "generate-bidi-protocol",
srcs = ["generate_bidi_protocol.py"],
args = ["$(location //javascript/selenium-webdriver:create-bidi-src_schema)"],
data = ["//javascript/selenium-webdriver:create-bidi-src_schema"],
main = "generate_bidi_protocol.py",
visibility = ["//visibility:public"],
)

py_library(
name = "bidi_protocol",
srcs = glob(["selenium/webdriver/_bidi/**/*.py"]),
imports = ["."],
visibility = ["//visibility:public"],
deps = [":exceptions"],
)

py_test_suite(
name = "unit",
size = "small",
Expand Down Expand Up @@ -1036,6 +1059,7 @@ FEATURE_SUITE_DEFS = {
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
test_suffix = "%s-bidi" % browser,
deps = [
":bidi_protocol", # bidi_protocol_tests.py imports the generated _bidi layer directly
":common_alert", # bidi_browsing_context_tests.py calls EC.alert_is_present()
":init-tree",
":webserver",
Expand Down
Loading
Loading