- 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 與 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 - 處理 iframe
- 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 IDE - 外掛
透過整合更多命令和定位器,可以進一步擴充套件 Selenium IDE 的功能。這有助於改進 Selenium IDE 的功能。Selenium IDE 中提供了無數的外掛,下面列出了一些最流行的外掛:
- Blazemaster Chrome 擴充套件程式 - 用於在 Selenium IDE 中執行負載測試。
- 適用於 Selenium IDE 的 Applitools - 用於在 Selenium IDE 中執行視覺測試。
- Chropath - 一個 Chrome 外掛,有助於識別 Web 元素的 xpath 和 css 定位器。
- Ranorex Selocity - 用於識別 Web 元素的 xpath 和 css 定位器。
- Katalon Recorder - 用於識別 Web 元素並記錄對其執行的操作。
- 頁面建模器 - 用於在多種語言上建立自動化測試。
如何在 Selenium IDE 中使用外掛?
讓我們看看如何將適用於 Selenium IDE 的 Applitools 外掛與 Selenium IDE 一起使用。這將有助於我們在 Selenium IDE 中執行視覺測試。視覺測試有助於驗證被測應用程式是否具有正確的 GUI 以供終端使用者使用。視覺測試最常見的示例是驗證徽標、Web 元素的顏色、文字的字型和字型大小、重疊文字等。
Selenium IDE 僅能夠進行功能測試,預設情況下無法執行視覺測試。適用於 Selenium IDE 的 Applitools 外掛建立在 Selenium IDE 之上,用於對視覺測試和功能測試進行自動化。
在 Selenium IDE 中使用外掛的步驟如下:
步驟 1 - 執行連結Selenium IDE 儲存變數中描述的步驟 1 到 4。
步驟 2 - 從 Web 商店安裝適用於 Selenium IDE 的 Applitools 外掛,如下面的圖片所示,然後點選“新增到 Chrome”按鈕。
步驟 3 - 點選彈出視窗上的“新增擴充套件程式”按鈕。
步驟 4 - 建議在步驟 4 之後重新啟動瀏覽器。然後,適用於 Selenium IDE 的 Applitools 圖示將出現在瀏覽器的右上角。點選它以啟動適用於 Selenium IDE 的 Applitools 擴充套件程式。然後點選“註冊免費帳戶”連結以獲取 API 金鑰。
步驟 5 - 在 Applitools 中建立一個帳戶,然後點選“登入”。
步驟 6 - 導航到以下連結並使用在步驟 5 中設定的憑據登入:
https://auth.applitools.com/users/login.
步驟 7 - 點選“我的 API 金鑰”連結並複製 API 金鑰。
步驟 8 - 點選適用於 Selenium IDE 的 Applitools 擴充套件程式並將步驟 10 中複製的 API 金鑰貼上到其中。然後點選“應用”按鈕。
步驟 9 - 應顯示訊息“請開啟 Selenium IDE”。點選 Selenium IDE 擴充套件程式。
步驟 10 - 點選“建立新專案”連結,然後在“請為您的新專案提供名稱”下輸入專案名稱,例如 Test12。最後,我們將點選“確定”按鈕。
步驟 11 - 我們現在將在 Selenium IDE 中準備好工作區。檢查適用於 Selenium IDE 的 Applitools 的眼睛命令,以在 Selenium IDE 中進行視覺測試。
步驟 12 - 讓我們以以下頁面為例,點選“是”標籤旁邊的單選按鈕,然後執行驗證整個視窗的視覺檢查點的視覺測試。
步驟 13 - 在“命令”欄位中輸入 open,在“目標”欄位中輸入Selenium 自動化實踐表單,以啟動應用程式。
步驟 14 - 在“命令”欄位中輸入 click,然後在“目標”欄位中輸入 xpath=/html/body/main/div/div/div[2]/form/div[1]/input。請注意,/html/body/main/div/div/div[2]/form/div[1]/input 是單選按鈕的 xpath 定位器值。
步驟 15 - 在“命令”欄位中輸入 eyes check window,然後在“目標”欄位中輸入 Window Check。
步驟 16 - 透過點選頂部的“執行所有測試”來執行測試。應顯示日誌訊息“正在為測試執行準備外掛”以及用於在 Applitools 中檢查視覺測試的 URL。
步驟 17 - 點選日誌中顯示的連結以檢視 Applitools 應用程式中生成的視覺測試結果。
步驟 18 - 點選 Applitools 中捕獲的螢幕截圖以獲取有關測試的更多詳細資訊,例如執行日期、解析度、平臺、瀏覽器等。
此測試包括功能和視覺自動化測試步驟,並且可以重新執行多次以驗證被測應用程式的功能和 GUI 是否正常工作。
結論
本文總結了我們對 Selenium IDE 外掛教程的全面概述。我們從描述 Selenium IDE 中使用的一些外掛開始,並提供了一個示例來逐步演示如何將外掛與 Selenium IDE 一起使用。這使您深入瞭解 Selenium IDE 中的外掛。建議您持續練習所學內容,並探索其他與 Selenium 相關的外掛,以加深理解並拓寬視野。
