

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 執行時間版本使用 Python 和 Selenium Webdriver
<a name="CloudWatch_Synthetics_Library_python_selenium"></a>

以下區段包含適用於 Python 和 Selenium Webdriver 的 CloudWatch Synthetics 執行時間版本的相關資訊。Selenium 是一種開放原始碼瀏覽器自動化工具。如需 Selenium 的詳細資訊，請參閱 [ www.selenium.dev/](https://www.selenium.dev)

如需了解 Selenium 架構上 Synthetics 執行時期支援的成員帳戶和方法，請參閱[僅適用於 UI Canary 的 Python 和 Selenium 程式庫類別和函式](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library_Python.html#CloudWatch_Synthetics_Library_Python_UIcanaries)，以及 [Selenium API 參考](https://www.selenium.dev/selenium/docs/api/py/api.html)。

這些執行時間版本的命名慣例為 `syn-language -framework-majorversion. minorversion`。

## syn-python-selenium-10.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-10.0"></a>

10.0 版是 Python 和 Selenium 的最新 CloudWatch Synthetics 執行時間。

**主要相依性**：
+ Python 3.11
+ 硒 4.32.0
+ Chromium 145.0.7632.77 版

**syn-python-selenium-10.0 的變更 ** 
+ 已套用安全性修補程式和更新的瀏覽器版本。

如需詳細資訊，請參閱下列內容：
+  [Selenium 變更日誌](https://www.selenium.dev/blog/2025/selenium-4-32-released) 
+  [Selenium 文件](https://www.selenium.dev/selenium/docs/api/py/api.html) 

## Python 和 Selenium 的先前執行時期版本
<a name="Previousversions-python-selenium"></a>

仍然支援下列舊版的 Python 和 Selenium 執行時期。

### syn-python-selenium-9.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-9.0"></a>

**主要相依性**：
+ Python 3.11
+ 硒 4.32.0
+ Chromium 143.0.7499.169 版

**syn-python-selenium-9.0 的變更 ** 
+ 已套用安全性修補程式和更新的瀏覽器版本。

如需詳細資訊，請參閱下列內容：
+  [Selenium 變更日誌](https://www.selenium.dev/blog/2025/selenium-4-32-released) 
+  [Selenium 文件](https://www.selenium.dev/selenium/docs/api/py/api.html) 

### syn-python-selenium-8.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-8.0"></a>

8.0 版是 Python 和 Selenium 的最新 CloudWatch Synthetics 執行時間。

**主要相依性**：
+ Python 3.11
+ 硒 4.32.0
+ Chromium 142.0.7444.175 版

**syn-python-selenium-8.0 的變更 ** 
+ 套用安全性修補程式並更新 Selenium 和瀏覽器版本。
+ 將失敗的 HAR 網路請求日誌層級從 ERROR 修改為 INFO。

如需詳細資訊，請參閱下列內容：
+  [Selenium 變更日誌](https://www.selenium.dev/blog/2025/selenium-4-32-released) 
+  [Selenium 文件](https://www.selenium.dev/selenium/docs/api/py/api.html) 

### syn-python-selenium-7.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-7.0"></a>

**主要相依性**：
+ Python 3.11
+ 硒 4.32.0
+ Chromium 138.0.7204.168 版

 **syn-python-selenium-7.0 的變更 ** 
+ 套用安全性修補程式並更新 Selenium 和瀏覽器版本。

如需詳細資訊，請參閱下列內容：
+  [Selenium 變更日誌](https://www.selenium.dev/blog/2025/selenium-4-32-released) 
+  [Selenium 文件](https://www.selenium.dev/selenium/docs/api/py/api.html) 

### syn-python-selenium-6.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-6.0"></a>

**主要相依性**：
+ Python 3.11
+ 硒 4.21.0
+ Chromium 131.0.6778.264 版

 **syn-python-selenium-6.0 的變更** 
+ 從 Python 3.9 升級到 Python 3.11。

如需詳細資訊，請參閱下列內容：
+  [Selenium 變更日誌](https://www.selenium.dev/blog/2024/selenium-4-21-released/) 
+  [Selenium 文件](https://www.selenium.dev/selenium/docs/api/py/api.html) 

### syn-python-selenium-5.1
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-5.1"></a>

**主要相依性**：
+ Python 3.9
+ 硒 4.21.0
+ Chromium 131.0.6778.264 版

 **syn-python-selenium-5.1 中的變更** 
+ 對指標發射進行微小更新。
+ 支援 Canary 的模擬執行，允許臨機操作執行或執行安全的 Canary 更新。

### syn-python-selenium-5.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-5.0"></a>

**主要相依性**：
+ Python 3.9
+ 硒 4.21.0
+ Chromium 131.0.6778.264 版

**syn-python-selenium-5.0 中的變更**：
+ 瀏覽器無法啟動時自動重試。

### syn-python-selenium-4.1
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-4.1"></a>

**主要相依性**：
+ Python 3.9
+ 硒 4.15.1
+ Chromium 126.0.6478.126 版

**syn-python-selenium-4.1 中的變更**：
+ **解決安全漏洞**：此執行時期更新解決了 [CVE-2024-39689](https://nvd.nist.gov/vuln/detail/CVE-2024-39689) 漏洞。

### syn-python-selenium-4.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-4.0"></a>

**主要相依性**：
+ Python 3.9
+ 硒 4.15.1
+ Chromium 126.0.6478.126 版

**syn-python-selenium-4.0 中的變更**：
+ **錯誤修正**：HAR 解析器記錄中的錯誤已修正。

## Python 和 Selenium 的已棄用執行時期版本
<a name="Deprecated-python-selenium"></a>

下列舊版的 Python 和 Selenium 執行時期已棄用。如需執行時期棄用日期的相關資訊，請參閱 [CloudWatch Synthetics 執行時期棄用日期](CloudWatch_Synthetics_Runtime_Support_Policy.md#runtime_deprecation_dates)。

### syn-python-selenium-3.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-3.0"></a>

**主要相依性**：
+ Python 3.8
+ 硒 4.15.1
+ Chromium 121.0.6167.139 版

**syn-python-selenium-3.0 中的變更**：
+ **已更新 Chromium 中綁定程式庫的版本**：Chromium 相依項更新為新版本。

### syn-python-selenium-2.1
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-2.1"></a>

**主要相依性**：
+ Python 3.8
+ 硒 4.15.1
+ Chromium 111.0.5563.146 版

**syn-python-selenium-2.1 中的變更**：
+ **已更新 Chromium 中綁定程式庫的版本**：Chromium 和 Selenium 相依項更新為新版本。

### syn-python-selenium-2.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-2.0"></a>

**主要相依性**：
+ Python 3.8
+ Selenium 4.10.0
+ Chromium 111.0.5563.146 版

**syn-python-selenium-2.0 中的變更**：
+ **更新的依賴關係**— Chromium 和 Selenium 的依賴關係更新為新版本。

**syn-python-selenium-2.0 中的錯誤修正**：
+ **加入了時間戳記** — 時間戳記已新增至金絲雀日誌。
+ **工作階段重複使用** — 修正了一個錯誤，因此金絲雀現在無法重複使用先前的金絲雀執行中的工作階段。

### syn-python-selenium-1.3
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.3"></a>

**主要相依性**：
+ Python 3.8
+ Selenium 3.141.0
+ Chromium 92.0.4512.0 版

**syn-python-selenium-1.3 中的變更**：
+ **更精確的時間戳記**：金絲雀執行的開始時間和停止時間現在已精確至毫秒。

### syn-python-selenium-1.2
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.2"></a>

**主要相依性**：
+ Python 3.8
+ Selenium 3.141.0
+ Chromium 92.0.4512.0 版
+ **更新相依項** – 此執行時間中唯一的新功能是更新的相依項。

### syn-python-selenium-1.1
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.1"></a>

**主要相依性**：
+ Python 3.8
+ Selenium 3.141.0
+ Chromium 83.0.4103.0 版

**功能：**
+ **自訂處理常式函數** – 您現在可以為 Canary 指令碼使用自訂處理常式函數。先前的執行時間要求指令碼進入點包含 `.handler`。

  您還可以將 Canary 指令碼放在任何資料夾中，並將資料夾名稱作為處理常式的一部分傳遞。例如：`MyFolder/MyScriptFile.functionname` 可用作進入點。
+ **用於新增指標和步驟失敗組態的組態選項** – 這些選項已在 Node.js Canary 的執行時間中提供。如需詳細資訊，請參閱 [SyntheticsConfiguration 類別](CloudWatch_Synthetics_Canaries_Library_Python.md#CloudWatch_Synthetics_Library_SyntheticsConfiguration_Python)。
+ **Chrome 中的自訂引數** – 您現在可以在無痕式模式下開啟瀏覽器或傳入代理伺服器組態。如需詳細資訊，請參閱[Chrome()](CloudWatch_Synthetics_Canaries_Library_Python.md#CloudWatch_Synthetics_Library_Python_Chrome)。
+ **跨區域成品儲存貯體** – Canary 可以將其成品存放在不同區域的 Simple Storage Service (Amazon S3) 儲存貯體中。
+ **錯誤修正，包括 `index.py` 問題的修正** – 對於以前的執行時間，名為 ` index.py` 的 Canary 檔案導致異常，因為其與程式庫檔案的名稱發生衝突。現在已修正此問題。

### syn-python-selenium-1.0
<a name="CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.0"></a>

**主要相依性**：
+ Python 3.8
+ Selenium 3.141.0
+ Chromium 83.0.4103.0 版

**功能：**
+ **Selenium 支援**— 您可以使用 Selenium 測試架構撰寫 Canary 指令碼。您可以將 Selenium 指令碼從其他位置帶入 CloudWatch Synthetics，並將使用 AWS 服務。