Mastering Selenium WebDriver 3.0 - Second Edition

Mark Collin



Complement Selenium with useful additions that fit seamlessly into the rich and well-crafted API that Selenium offers

Key Features

  • Understand the power, simplicity, and limitations of the core Selenium framework
  • Write clear, readable, and reliable tests that perform complex test automation tasks
  • Work with ChromeDriver and GeckoDriver in headless mode

Book Description

The second edition of Mastering Selenium 3.0 WebDriver starts by showing you how to build your own Selenium framework with Maven. You'll overcome your initial shell shock by solving difficult problems that you will face as you start using Selenium in an enterprise environment and produce the right feedback when failing. Next, you'll explore common exceptions that you will come across as you use Selenium, the root cause of these exceptions, and how to fix them.

Along the way, you'll use Advanced User Interactions (APIs), running any JavaScript you need through Selenium, and learn to quickly spin up a Selenium Grid using Docker containers. In the concluding chapters, you'll work through a series of scenarios that demonstrate how to extend Selenium to work with external libraries and applications so that you can be sure you are using the right tool for the job.

What you will learn

  • Provide fast, useful feedback with screenshots
  • Create extensible, well-composed page objects
  • Utilize ChromeDriver and GeckoDriver in headless mode
  • Leverage the full power of Advanced User Interactions (APIs)
  • Use JavascriptExecutor to execute JavaScript snippets in the browser through Selenium
  • Build user interaction into your test script using JavascriptExecutor
  • Learn the basics of working with Appium

Who This Book Is For

If you are a software tester or a developer with working experience in Selenium and competency with Java, who is interested in automation and are looking forward to taking the next step in their learning journey, then this is the book for you.


使用 Selenium 的豐富且精心設計的 API,補充 Selenium 的有用擴充功能。

- 了解核心 Selenium 框架的功能、簡單性和限制
- 撰寫清晰、易讀且可靠的測試,執行複雜的自動化測試任務
- 在無頭模式下使用 ChromeDriver 和 GeckoDriver

《Mastering Selenium 3.0 WebDriver》第二版首先向您展示如何使用 Maven 構建自己的 Selenium 框架。您將解決在企業環境中使用 Selenium 遇到的困難問題,並在失敗時提供正確的反饋。接下來,您將探索在使用 Selenium 過程中遇到的常見異常、這些異常的根本原因以及如何修復它們。

在此過程中,您將使用高級用戶交互 (API) 通過 Selenium 執行所需的任何 JavaScript,並學習如何使用 Docker 容器快速啟動 Selenium Grid。在結尾章節中,您將通過一系列場景示例,展示如何擴展 Selenium 以與外部庫和應用程序一起使用,以確保您使用的是適合工作的正確工具。

- 使用截圖提供快速、有用的反饋
- 創建可擴展、結構良好的頁面對象
- 在無頭模式下使用 ChromeDriver 和 GeckoDriver
- 充分利用高級用戶交互 (API) 的功能
- 使用 JavascriptExecutor 通過 Selenium 在瀏覽器中執行 JavaScript 片段
- 在測試腳本中使用 JavascriptExecutor 建立用戶交互
- 學習與 Appium 的基礎操作

如果您是具有 Selenium 工作經驗並熟悉 Java 的軟體測試人員或開發人員,對自動化感興趣並希望在學習旅程中邁出下一步的話,這本書非常適合您。