Chapter 4. Selenium WebDriver Best Practices

In this chapter, we will learn the best practices for Selenium WebDriver and its techniques for handling a complex web application. Better understanding of WebDriver provides better results to find a quick solution. For example, JavascriptExecutor provides a quick workaround to automate web pages at a faster rate without using DOM.

In general, we face problems while involving an automation process without examining the application. It's quite necessary to understand why standard WebDriver approaches fail to work. Most of the problems occur when a page is overloaded with Ajax calls that load DOM elements asynchronously or when a page contains lots of frames, ActiveX/flex/flash components, and so on. Eventually, ...

Get Selenium Essentials 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.