© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
S. ShuklaThe Protractor Handbookhttps://doi.org/10.1007/978-1-4842-7289-3_8

8. Waits and Timeouts

Shashank Shukla1  
(1)
Mandla, Madhya Pradesh, India
 

This chapter discusses waits. Unreliability in tests occurs due to rare conditions between the browser and the automation tool’s instructions. There are times when the browser lags, and the automation tool’s instructions are executed even when the element is not yet available in the DOM. Sometimes the element loads after a few seconds, depending on the network bandwidth server response time or how animation-intensive the web page is.

This chapter examines three ways to handle waits in Protractor or Selenium.

Get The Protractor Handbook: Understanding and Implementing the Tool Effectively 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.