Skip to content
Merged
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
38 changes: 4 additions & 34 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "platforms", version = "0.0.10")

# Required for the closure rules
bazel_dep(name = "protobuf", dev_dependency = True, repo_name = "com_google_protobuf", version = "29.2")
bazel_dep(name = "protobuf", version = "29.2", dev_dependency = True, repo_name = "com_google_protobuf")

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

bazel_dep(name = "rules_dotnet", version = "0.17.5")
bazel_dep(name = "rules_java", version = "7.12.4")
bazel_dep(name = "rules_jvm_external", version = "6.6")
Expand All @@ -27,33 +28,27 @@ bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_ruby", version = "0.13.0")

linter = use_extension("@apple_rules_lint//lint:extensions.bzl", "linter")

linter.configure(
name = "java-spotbugs",
config = "//java:spotbugs-config",
)

linter.configure(
name = "rust-rustfmt",
config = "//rust:enable-rustfmt",
)

linter.register(name = "rust-rustfmt")

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")

node.toolchain(node_version = "20.9.0")

pnpm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
"pnpm",
dev_dependency = True,
)

use_repo(pnpm, "pnpm")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")

npm.npm_translate_lock(
name = "npm",
data = [
Expand All @@ -68,76 +63,59 @@ npm.npm_translate_lock(
update_pnpm_lock = True,
verify_node_modules_ignored = "//:.bazelignore",
)

use_repo(npm, "npm")

rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)

rules_ts_ext.deps(
ts_version = "4.9.5",
)

use_repo(rules_ts_ext, "npm_typescript")

esbuild = use_extension("@aspect_rules_esbuild//esbuild:extensions.bzl", "esbuild")

esbuild.toolchain(esbuild_version = "0.23.0")

use_repo(esbuild, "esbuild_toolchains")

register_toolchains("@esbuild_toolchains//:all")

dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")

dotnet.toolchain(dotnet_version = "8.0.203")

use_repo(dotnet, "dotnet_toolchains")

selenium_paket = use_extension("//dotnet:paket.nuget_extension.bzl", "nuget_extension")

use_repo(selenium_paket, "paket.nuget")

register_toolchains("@dotnet_toolchains//:all")

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

oci.pull(
name = "java_image_base",
digest = "sha256:161a1d97d592b3f1919801578c3a47c8e932071168a96267698f4b669c24c76d",
image = "gcr.io/distroless/java17",
)

oci.pull(
name = "firefox_standalone",
digest = "sha256:b6d8279268b3183d0d33e667e82fec1824298902f77718764076de763673124f",
image = "index.docker.io/selenium/standalone-firefox",
)

oci.pull(
name = "chrome_standalone",
digest = "sha256:1b809a961a0a77787a7cccac74ddc5570b7e89747f925b8469ddb9a6624d4ece",
image = "index.docker.io/selenium/standalone-chrome",
)

use_repo(oci, "chrome_standalone", "firefox_standalone", "java_image_base")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")

python.toolchain(
is_default = True,
python_version = "3.9",
)

python.toolchain(python_version = "3.10")

python.toolchain(python_version = "3.11")

python.toolchain(python_version = "3.12")

use_repo(python, "pythons_hub")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
Expand All @@ -162,16 +140,15 @@ register_toolchains("@pythons_hub//:all")

# https://github.com/bazelbuild/rules_jvm_external/pull/1079
archive_override(
integrity = "sha256-yS8Qes1PLbYbe10b1WSgl0Auqn/1Wlxg8O3wSr7a/Sg=",
module_name = "rules_jvm_external",
integrity = "sha256-yS8Qes1PLbYbe10b1WSgl0Auqn/1Wlxg8O3wSr7a/Sg=",
patch_strip = 1,
patches = ["//java:rules_jvm_external_javadoc.patch"],
strip_prefix = "rules_jvm_external-f572a26116c7ef71d8842dd056c2605782f7be8d",
urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/f572a26116c7ef71d8842dd056c2605782f7be8d.tar.gz"],
)

java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")

use_repo(
java_toolchains,
"remote_java_tools",
Expand All @@ -188,7 +165,6 @@ use_repo(
)

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
name = "maven",
artifacts = [
Expand Down Expand Up @@ -267,11 +243,9 @@ maven.install(
resolver = "maven",
strict_visibility = True,
)

use_repo(maven, "maven", "unpinned_maven")

ruby = use_extension("@rules_ruby//ruby:extensions.bzl", "ruby")

ruby.toolchain(
name = "ruby",
msys2_packages = [
Expand All @@ -280,7 +254,6 @@ ruby.toolchain(
],
version_file = "//:rb/.ruby-version",
)

ruby.bundle_fetch(
name = "bundle",
srcs = [
Expand Down Expand Up @@ -371,13 +344,11 @@ ruby.bundle_fetch(
gemfile = "//:rb/Gemfile",
gemfile_lock = "//:rb/Gemfile.lock",
)

use_repo(ruby, "bundle", "ruby", "ruby_toolchains")

register_toolchains("@ruby_toolchains//:all")

selenium_manager_artifacts = use_extension("//common:selenium_manager.bzl", "selenium_manager_artifacts")

use_repo(
selenium_manager_artifacts,
"download_sm_linux",
Expand All @@ -386,7 +357,6 @@ use_repo(
)

pin_browsers_extension = use_extension("//common:repositories.bzl", "pin_browsers_extension")

use_repo(
pin_browsers_extension,
"linux_beta_firefox",
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/common/actions/action_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def add_pointer_input(self, kind: str, name: str) -> PointerInput:
- "mouse"
- "touch"
- "pen"

name : str
The name of the pointer input device.

Expand Down
9 changes: 9 additions & 0 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def execute_cdp_cmd(self, cmd: str, cmd_args: dict):
----------
cmd : str,
- Command name

cmd_args : dict
- Command args
- Empty dict {} if there is no command args
Expand All @@ -407,6 +408,7 @@ def execute(self, driver_command: str, params: dict = None) -> dict:
----------
driver_command : str
- The name of the command to execute as a string.

params : dict
- A dictionary of named Parameters to send with the command.

Expand Down Expand Up @@ -502,6 +504,7 @@ def execute_script(self, script, *args):
----------
script : str
- The javascript to execute.

*args : tuple
- Any applicable arguments for your JavaScript.

Expand Down Expand Up @@ -531,6 +534,7 @@ def execute_async_script(self, script: str, *args):
----------
script : str
- The javascript to execute.

*args : tuple
- Any applicable arguments for your JavaScript.

Expand Down Expand Up @@ -1005,6 +1009,7 @@ def set_window_size(self, width, height, windowHandle: str = "current") -> None:
----------
width : int
- the width in pixels to set the window to

height : int
- the height in pixels to set the window to

Expand Down Expand Up @@ -1038,6 +1043,7 @@ def set_window_position(self, x: float, y: float, windowHandle: str = "current")
---------
x : float
- The x-coordinate in pixels to set the window position

y : float
- The y-coordinate in pixels to set the window position

Expand Down Expand Up @@ -1398,6 +1404,7 @@ def download_file(self, file_name: str, target_directory: str) -> None:
----------
file_name : str
- The name of the file to download.

target_directory : str
- The path to the directory to save the downloaded file.

Expand Down Expand Up @@ -1493,8 +1500,10 @@ def fedcm_dialog(self, timeout=5, poll_frequency=0.5, ignored_exceptions=None):
----------
timeout : int
- How long to wait for the dialog

poll_frequency : floatHow
- Frequently to poll

ignored_exceptions : Any
- Exceptions to ignore while waiting

Expand Down
5 changes: 3 additions & 2 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,10 @@ def _execute(self, command, params=None):

Parameters:
----------
command : any
command : any
The name of the command to _execute as a string.
params : dict

params : dict
A dictionary of named Parameters to send with the command.

Returns:
Expand Down
5 changes: 5 additions & 0 deletions py/selenium/webdriver/support/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ def __init__(
driver
- Instance of WebDriver (Ie, Firefox, Chrome or Remote) or
a WebElement

timeout
- Number of seconds before timing out

poll_frequency
- Sleep interval between calls
- By default, it is 0.5 second.

ignored_exceptions
- Iterable structure of exception classes ignored during calls.
- By default, it contains NoSuchElementException only.
Expand Down Expand Up @@ -99,6 +102,7 @@ def until(self, method: Callable[[D], Union[Literal[False], T]], message: str =
----------
method: callable(WebDriver)
- A callable object that takes a WebDriver instance as an argument.

message: str
- Optional message for :exc:`TimeoutException`

Expand Down Expand Up @@ -151,6 +155,7 @@ def until_not(self, method: Callable[[D], T], message: str = "") -> Union[T, Lit
----------
method: callable(WebDriver)
- A callable object that takes a WebDriver instance as an argument.

message: str
- Optional message for :exc:`TimeoutException`

Expand Down
Loading