Chapter 9. Third-Party Integrations

This chapter introduces different third-party technologies (such as libraries or frameworks) that we can use with Selenium WebDriver. We need to use these technologies when the Selenium WebDriver API is insufficient to carry out specific tasks. This is the case for file downloading, in which we need to use a third-party utility to wait until the files are correctly downloaded or, alternatively, use an HTTP client to control the download. We also capture the HTTP traffic using a third-party proxy.

Another scenario in which we need to use external utilities with Selenium WebDriver is when implementing nonfunctional tests, such as performance, security, accessibility, or A/B testing. We can also use third-party libraries to develop Selenium WebDriver tests using a fluent API, generate fake test data, or improve test reporting. Finally, we can integrate relevant frameworks such as Cucumber for Behavior Driven Development (BDD) or the Spring Framework (for developing web applications). We will go through all of these uses in this chapter.

Tip

To use the third-party utilities presented in this chapter, you must first include the required dependencies in your project. You can find the details for resolving each dependency using Maven and Gradle in Appendix C.

File Download

Selenium WebDriver has limited support for file downloading because its API does not expose download progress. In other words, we can use Selenium WebDriver to download files ...

Get Hands-On Selenium WebDriver with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.