
- Selenium 教程
- Selenium - 首頁
- Selenium - 概述
- Selenium - 元件
- Selenium - 自動化測試
- Selenium - 環境搭建
- Selenium - 遠端控制
- Selenium IDE 教程
- Selenium - IDE 簡介
- Selenium - 功能
- Selenium - 限制
- Selenium - 安裝
- Selenium - 建立測試
- Selenium - 建立指令碼
- Selenium - 控制流
- Selenium - 儲存變數
- Selenium - 警報和彈出視窗
- Selenium - Selenese 命令
- Selenium - 動作命令
- Selenium - 獲取器命令
- Selenium - 斷言命令
- Selenium - 斷言/驗證方法
- Selenium - 定位策略
- Selenium - 指令碼除錯
- Selenium - 驗證點
- Selenium - 模式匹配
- Selenium - JSON 資料檔案
- Selenium - 瀏覽器執行
- Selenium - 使用者擴充套件
- Selenium - 程式碼匯出
- Selenium - 程式碼輸出
- Selenium - JavaScript 函式
- Selenium - 外掛
- Selenium WebDriver 教程
- Selenium - 簡介
- Selenium WebDriver vs RC
- Selenium - 安裝
- Selenium - 第一個測試指令碼
- Selenium - 驅動程式會話
- Selenium - 瀏覽器選項
- Selenium - Chrome 選項
- Selenium - Edge 選項
- Selenium - Firefox 選項
- Selenium - Safari 選項
- Selenium - 雙擊
- Selenium - 右擊
- Python 中的 HTML 報告
- 處理編輯框
- Selenium - 單個元素
- Selenium - 多個元素
- Selenium Web 元素
- Selenium - 檔案上傳
- Selenium - 定位策略
- Selenium - 相對定位器
- Selenium - 查詢器
- Selenium - 查詢所有連結
- Selenium - 使用者互動
- Selenium - WebElement 命令
- Selenium - 瀏覽器互動
- Selenium - 瀏覽器命令
- Selenium - 瀏覽器導航
- Selenium - 警報和彈出視窗
- Selenium - 處理表單
- Selenium - 視窗和標籤頁
- Selenium - 處理連結
- Selenium - 輸入框
- Selenium - 單選按鈕
- Selenium - 複選框
- Selenium - 下拉框
- Selenium - 處理IFrames
- Selenium - 處理Cookie
- Selenium - 日期時間選擇器
- Selenium - 動態Web表格
- Selenium - Actions 類
- Selenium - Action 類
- Selenium - 鍵盤事件
- Selenium - 鍵上/下
- Selenium - 複製和貼上
- Selenium - 處理特殊鍵
- Selenium - 滑鼠事件
- Selenium - 拖放
- Selenium - 筆事件
- Selenium - 滾動操作
- Selenium - 等待策略
- Selenium - 顯式/隱式等待
- Selenium - 支援功能
- Selenium - 多選
- Selenium - 等待支援
- Selenium - 選擇支援
- Selenium - 顏色支援
- Selenium - ThreadGuard
- Selenium - 錯誤和日誌記錄
- Selenium - 異常處理
- Selenium - 其他
- Selenium - 處理Ajax呼叫
- Selenium - JSON 資料檔案
- Selenium - CSV 資料檔案
- Selenium - Excel 資料檔案
- Selenium - 跨瀏覽器測試
- Selenium - 多瀏覽器測試
- Selenium - 多視窗測試
- Selenium - JavaScript 執行器
- Selenium - 無頭執行
- Selenium - 捕獲螢幕截圖
- Selenium - 捕獲影片
- Selenium - 頁面物件模型
- Selenium - 頁面工廠
- Selenium - 錄製和回放
- Selenium - 框架
- Selenium - 瀏覽上下文
- Selenium - DevTools
- Selenium Grid 教程
- Selenium - 概述
- Selenium - 架構
- Selenium - 元件
- Selenium - 配置
- Selenium - 建立測試指令碼
- Selenium - 測試執行
- Selenium - 端點
- Selenium - 自定義節點
- Selenium 報告工具
- Selenium - 報告工具
- Selenium - TestNG
- Selenium - JUnit
- Selenium - Allure
- Selenium & 其他技術
- Selenium - Java 教程
- Selenium - Python 教程
- Selenium - C# 教程
- Selenium - Javascript 教程
- Selenium - Kotlin 教程
- Selenium - Ruby 教程
- Selenium - Maven & Jenkins
- Selenium - 資料庫測試
- Selenium - LogExpert 日誌記錄
- Selenium - Log4j 日誌記錄
- Selenium - Robot Framework
- Selenium - AutoIT
- Selenium - Flash 測試
- Selenium - Apache Ant
- Selenium - Github 教程
- Selenium - SoapUI
- Selenium - Cucumber
- Selenium - IntelliJ
- Selenium - XPath
- Selenium 其他概念
- Selenium - IE 驅動程式
- Selenium - 自動化框架
- Selenium - 關鍵字驅動框架
- Selenium - 資料驅動框架
- Selenium - 混合驅動框架
- Selenium - SSL 證書錯誤
- Selenium - 替代方案
- Selenium 有用資源
- Selenium - 問答
- Selenium - 快速指南
- Selenium - 有用資源
- Selenium - 自動化實踐
- Selenium - 討論
Selenium IDE - 功能
Selenium 整合開發環境 (IDE) 是目前可用於 Chrome 和 Firefox 瀏覽器的外掛。它用作基於 Web 的應用程式自動化測試工具。Selenium IDE 使用方便,安裝簡便。可以使用 Selenium IDE 快速設計和執行測試用例。
Selenium IDE 主要提供一個圖形介面,使使用者能夠記錄在被測應用程式上執行的所有操作。Selenium IDE 可以很好地用於透過在任何測試步驟周圍設定斷點來除錯指令碼,從而對測試用例中的錯誤進行故障排除。
Selenium IDE 的關鍵功能
Selenium IDE 具有許多功能,其中一些列在下面:
錄製和回放
Selenium IDE 具有允許錄製在被測應用程式上執行的使用者操作的功能。這些使用者操作的錄製可以回放並用作測試。如果不需要,則可以不使用錄製和回放功能,並且可以從頭開始開發測試指令碼。此外,可以根據需要修改通過錄制建立的測試。
驗證
透過新增各種斷言和驗證命令,可以更有效地使用 Selenium IDE 測試。它們在 Selenium IDE 中預設可用,有助於提高測試覆蓋率。
Selenese 命令
Selenium IDE 中使用的每個命令都稱為 Selenese 命令。使用 Selenese 命令,我們可以在 Web 應用程式上執行所有測試活動。Selenese 命令有三種類型:
- 操作 - 操作命令 用於操作被測應用程式的狀態。例如,單擊、鍵入、開啟、關閉等。
- 獲取器 - 獲取器命令 用於評估被測應用程式的狀態並將其儲存在變數中。例如,儲存標題、儲存文字和儲存值。
- 斷言 - 斷言命令 用於檢查被測應用程式的狀態。它有三種子型別:assert、verify 和 waitfor。
第三方外掛
可以在 Selenium IDE 中安裝許多第三方外掛來執行其他操作。
CI/CD 支援
可以使用 Selenium IDE 測試的 .side 檔案從 side-runner(即從命令列)執行 Selenium IDE 測試。這使得它易於與 Jenkins、CircleCI 等 CI/CD 工具配置。
跨瀏覽器測試
可以在多個瀏覽器(如 Chrome、Firefox、Safari、Edge 等)上執行 Selenium IDE 測試,以確認被測應用程式與所有瀏覽器相容。
響應能力
使用 Selenium IDE 設計的測試可以在 Visual Grid 上執行,Visual Grid 包含多種裝置、視口大小和瀏覽器變體。
Selenium IDE 的元件
Selenium IDE 具有以下元件:
選單欄
選單欄包含專案名稱、建立新專案或開啟現有專案、儲存專案的選項,以及三個點用於更改一些 Selenium IDE 設定。下圖突出顯示了 Selenium IDE 選單欄部分。

工具欄
工具欄包含測試執行速度選項(控制測試執行速度)、單步執行當前命令選項(用於單步執行測試)、運行當前測試選項(執行當前選擇的測試)和執行所有測試選項(執行測試套件中的每個測試)。下圖突出顯示了 Selenium IDE 工具欄部分。

位址列
位址列包含一個下拉選單,該選單儲存基本 URL 的每個先前值。下圖突出顯示了 Selenium IDE 位址列部分。

測試用例面板
測試用例面板包含 Selenium IDE 記錄的每個測試。下圖突出顯示了 Selenium IDE 測試用例面板部分。

測試指令碼編輯框
測試指令碼編輯框包含實際的測試步驟、使用者操作、驗證等,這些步驟是在 Selenium IDE 中記錄或設計的。
測試指令碼編輯框包含以下元件:命令(負責對被測應用程式的 Web 元素執行操作)、目標(可選欄位)(透過提及元素的屬性名稱和值來精確指向要對其執行操作的 Web 元素)、值(可選欄位)(用於傳遞值或引數)、註釋(可選欄位)(向測試步驟添加註釋)、啟用/停用命令、新增新視窗配置、選擇頁面中的目標和在頁面中查詢目標。
下圖突出顯示了 Selenium IDE 測試指令碼編輯器部分。

錄製按鈕
錄製按鈕用於啟動和停止Selenium整合開發環境中測試的錄製。下圖突出顯示了Selenium整合開發環境的錄製部分。

日誌
日誌部分捕獲執行訊息、資訊、警告(如有)和錯誤。它用綠色的“OK”或紅色的“失敗”指示來表示特定步驟是否透過,並顯示測試用例的最終結果(透過或失敗)。下圖突出顯示了Selenium整合開發環境的日誌部分。

參考
參考部分顯示測試指令碼編輯器中當前選定測試步驟的每一個資訊,包括要傳遞的引數、定位器、值等等。下圖突出顯示了Selenium整合開發環境的參考部分。

結論
本教程到此結束,我們對Selenium IDE的功能進行了全面概述。我們首先描述了Selenium IDE的關鍵功能和元件。這使您能夠深入瞭解Selenium IDE的功能。建議您繼續練習所學內容,並探索其他與Selenium相關的知識,以加深理解並拓寬視野。