From cc16e3fe18971d5ecb37e26a37bcda76cda7c48b Mon Sep 17 00:00:00 2001 From: delta456 Date: Wed, 11 Dec 2024 23:19:36 +0530 Subject: [PATCH 1/3] Revert "add alias attr to all edge structs" This reverts commit f17dd08dd32998a310510f0abc44e5b484202a4d. --- rust/src/edge.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 8b844dd718630..582a7f1717b38 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager { #[derive(Serialize, Deserialize, Debug)] pub struct EdgeProduct { - #[serde(rename = "Product", alias = "product")] + #[serde(rename = "Product")] pub product: String, - #[serde(rename = "Releases", alias = "releases")] + #[serde(rename = "Releases")] pub releases: Vec, } #[derive(Serialize, Deserialize, Debug)] pub struct Release { - #[serde(rename = "ReleaseId", alias = "releaseId")] + #[serde(rename = "ReleaseId")] pub release_id: u32, - #[serde(rename = "Platform", alias = "platform")] + #[serde(rename = "Platform")] pub platform: String, - #[serde(rename = "Architecture", alias = "architecture")] + #[serde(rename = "Architecture")] pub architecture: String, - #[serde(rename = "CVEs", alias = "cves")] + #[serde(rename = "CVEs")] pub cves: Vec, - #[serde(rename = "ProductVersion", alias = "productVersion")] + #[serde(rename = "ProductVersion")] pub product_version: String, - #[serde(rename = "Artifacts", alias = "artifacts")] + #[serde(rename = "Artifacts")] pub artifacts: Vec, - #[serde(rename = "PublishedTime", alias = "publishedTime")] + #[serde(rename = "PublishedTime")] pub published_time: String, - #[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")] + #[serde(rename = "ExpectedExpiryDate")] pub expected_expiry_date: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "ArtifactName", alias = "artifactName")] + #[serde(rename = "ArtifactName")] pub artifact_name: String, - #[serde(rename = "Location", alias = "location")] + #[serde(rename = "Location")] pub location: String, - #[serde(rename = "Hash", alias = "hash")] + #[serde(rename = "Hash")] pub hash: String, - #[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")] + #[serde(rename = "HashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] + #[serde(rename = "SizeInBytes")] pub size_in_bytes: u32, } From 56b3769ef5771bbab56eb478e21bad582bed9eaa Mon Sep 17 00:00:00 2001 From: delta456 Date: Tue, 31 Dec 2024 17:40:08 +0530 Subject: [PATCH 2/3] Reapply "add alias attr to all edge structs" This reverts commit cc16e3fe18971d5ecb37e26a37bcda76cda7c48b. oops --- rust/src/edge.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 582a7f1717b38..8b844dd718630 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager { #[derive(Serialize, Deserialize, Debug)] pub struct EdgeProduct { - #[serde(rename = "Product")] + #[serde(rename = "Product", alias = "product")] pub product: String, - #[serde(rename = "Releases")] + #[serde(rename = "Releases", alias = "releases")] pub releases: Vec, } #[derive(Serialize, Deserialize, Debug)] pub struct Release { - #[serde(rename = "ReleaseId")] + #[serde(rename = "ReleaseId", alias = "releaseId")] pub release_id: u32, - #[serde(rename = "Platform")] + #[serde(rename = "Platform", alias = "platform")] pub platform: String, - #[serde(rename = "Architecture")] + #[serde(rename = "Architecture", alias = "architecture")] pub architecture: String, - #[serde(rename = "CVEs")] + #[serde(rename = "CVEs", alias = "cves")] pub cves: Vec, - #[serde(rename = "ProductVersion")] + #[serde(rename = "ProductVersion", alias = "productVersion")] pub product_version: String, - #[serde(rename = "Artifacts")] + #[serde(rename = "Artifacts", alias = "artifacts")] pub artifacts: Vec, - #[serde(rename = "PublishedTime")] + #[serde(rename = "PublishedTime", alias = "publishedTime")] pub published_time: String, - #[serde(rename = "ExpectedExpiryDate")] + #[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")] pub expected_expiry_date: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "ArtifactName")] + #[serde(rename = "ArtifactName", alias = "artifactName")] pub artifact_name: String, - #[serde(rename = "Location")] + #[serde(rename = "Location", alias = "location")] pub location: String, - #[serde(rename = "Hash")] + #[serde(rename = "Hash", alias = "hash")] pub hash: String, - #[serde(rename = "HashAlgorithm")] + #[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "SizeInBytes")] + #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] pub size_in_bytes: u32, } From 81c6b4376b229da393e11e9d2278fcf8069b882f Mon Sep 17 00:00:00 2001 From: delta456 Date: Tue, 31 Dec 2024 18:15:43 +0530 Subject: [PATCH 3/3] [py] add doc for driver_path_env_key --- py/selenium/webdriver/chromium/service.py | 1 + py/selenium/webdriver/edge/service.py | 1 + py/selenium/webdriver/firefox/service.py | 1 + py/selenium/webdriver/safari/service.py | 1 + 4 files changed, 4 insertions(+) diff --git a/py/selenium/webdriver/chromium/service.py b/py/selenium/webdriver/chromium/service.py index f6c71e3ba719a..621b86051a886 100644 --- a/py/selenium/webdriver/chromium/service.py +++ b/py/selenium/webdriver/chromium/service.py @@ -32,6 +32,7 @@ class ChromiumService(service.Service): :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable. :param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file. :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`. + :param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. """ def __init__( diff --git a/py/selenium/webdriver/edge/service.py b/py/selenium/webdriver/edge/service.py index ea49d8c5ca3a0..8d7b6b2fbc371 100644 --- a/py/selenium/webdriver/edge/service.py +++ b/py/selenium/webdriver/edge/service.py @@ -32,6 +32,7 @@ class Service(service.ChromiumService): :param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file. :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable. :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`. + :param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. """ def __init__( diff --git a/py/selenium/webdriver/firefox/service.py b/py/selenium/webdriver/firefox/service.py index 59c8c18058b3b..d9a715a5d22e0 100644 --- a/py/selenium/webdriver/firefox/service.py +++ b/py/selenium/webdriver/firefox/service.py @@ -32,6 +32,7 @@ class Service(service.Service): :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable. :param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file. :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`. + :param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. """ def __init__( diff --git a/py/selenium/webdriver/safari/service.py b/py/selenium/webdriver/safari/service.py index c20e2ec85df05..79448b9789a26 100644 --- a/py/selenium/webdriver/safari/service.py +++ b/py/selenium/webdriver/safari/service.py @@ -32,6 +32,7 @@ class Service(service.Service): :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable. :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`. :param enable_logging: (Optional) Enable logging of the service. Logs can be located at `~/Library/Logs/com.apple.WebDriver/` + :param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. """ def __init__(