×
☰ See All Chapters

Puppeteer wait methods -Synchronization

Automation tool executes the test cases one after the other without any waits. In this case result of one test case could collide with another test case. Let us consider puppeteer has clicked on a button and this button invoked call to server. Before the response comes if puppeteer executes other test case then the result is un-desirable.

Synchronization in puppeteer is a mechanism of maintaining the execution pace between automation tool (puppeteer) and application under testing.

Puppeeteer Page class provides wait methods to achieve synchronization in automation. Below is the list of wait methods provided by Page class.

puppeteer-wait-methods-0
 

Click on the below links to read puppeteer different wait methods

Puppeteer waitForSelector

Puppeteer waitForXPath

Puppeteer waitForFunction

Puppeteer waitFor

 


All Chapters
Author