diff --git a/MODULE.bazel b/MODULE.bazel index a60b6ad1e9e1e..9fc7a00a43f4d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -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") @@ -27,21 +28,17 @@ 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( @@ -49,11 +46,9 @@ pnpm = use_extension( "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 = [ @@ -68,7 +63,6 @@ npm.npm_translate_lock( update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", ) - use_repo(npm, "npm") rules_ts_ext = use_extension( @@ -76,68 +70,52 @@ rules_ts_ext = use_extension( "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") @@ -162,8 +140,8 @@ 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", @@ -171,7 +149,6 @@ archive_override( ) java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") - use_repo( java_toolchains, "remote_java_tools", @@ -188,7 +165,6 @@ use_repo( ) maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") - maven.install( name = "maven", artifacts = [ @@ -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 = [ @@ -280,7 +254,6 @@ ruby.toolchain( ], version_file = "//:rb/.ruby-version", ) - ruby.bundle_fetch( name = "bundle", srcs = [ @@ -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", @@ -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", diff --git a/py/selenium/webdriver/common/actions/action_builder.py b/py/selenium/webdriver/common/actions/action_builder.py index 8b7a90bf4302e..cc6e23a1925cd 100644 --- a/py/selenium/webdriver/common/actions/action_builder.py +++ b/py/selenium/webdriver/common/actions/action_builder.py @@ -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. diff --git a/py/selenium/webdriver/remote/webdriver.py b/py/selenium/webdriver/remote/webdriver.py index 71cea51047572..001708db115ef 100644 --- a/py/selenium/webdriver/remote/webdriver.py +++ b/py/selenium/webdriver/remote/webdriver.py @@ -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 @@ -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. @@ -502,6 +504,7 @@ def execute_script(self, script, *args): ---------- script : str - The javascript to execute. + *args : tuple - Any applicable arguments for your JavaScript. @@ -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. @@ -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 @@ -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 @@ -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. @@ -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 diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index a6b17fc9ebe88..54e0966102831 100644 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -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: diff --git a/py/selenium/webdriver/support/wait.py b/py/selenium/webdriver/support/wait.py index 36cf2c0de62cc..89951578cd722 100644 --- a/py/selenium/webdriver/support/wait.py +++ b/py/selenium/webdriver/support/wait.py @@ -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. @@ -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` @@ -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`