[py] Modularize Bazel build with per-module targets by titusfortner · Pull Request #17012 · SeleniumHQ/selenium
Add separate py_library targets for each module following Ruby's pattern: - exceptions: Base exception classes - remote: Wire protocol and WebDriver commands - bidi: BiDi protocol support - common: Shared utilities, actions, selenium-manager, devtools - support: Wait conditions, event listeners - chromium: Base for Chrome/Edge - chrome, edge, firefox, safari, ie, webkitgtk, wpewebkit: Browser drivers The aggregate :selenium target is preserved for backwards compatibility, depending on all module targets. This enables: - Faster incremental builds when editing a single module - Clear dependency graph between modules - Future ability for users to depend on subsets (with lazy imports) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update browser test targets to depend on specific modules instead of the aggregate :selenium target: - test-chrome → :chrome, :common, :support - test-firefox → :firefox, :common, :support - test-edge → :edge, :common, :support - etc. This enables faster incremental test builds when only one module is modified. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add missing deps identified in PR review: - :bidi needs :remote (imports websocket_connection) - :support needs :common (imports by, alert) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move selenium/__init__.py and selenium/webdriver/__init__.py to the :exceptions module so lazy imports (e.g., webdriver.ChromeOptions) work when depending on individual modules like :chrome instead of :selenium. This fixes integration test failures where tests use lazy import syntax. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes mypy error about incompatible types in assignment when handler is assigned different RemoteConnection subclasses. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use the Driver class from conftest to handle both local and remote execution. The test now works with both --remote flag and without it. Move test from remote/ to firefox/ folder since it's testing a Firefox-specific feature (profiles), not a remote-only feature. Rename from remote_firefox_profile_tests.py to firefox_profile_tests.py. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters