Learning about Puppeteer’s Advanced Test Automation Capabilities
Learn about the advanced test automation capabilities of the Puppeteer framework.
We'll cover the following
Measuring code coverage is also considered a powerful capability within software test automation. Like Playwright, Puppeteer JavaScript and CSS code coverage with Istanbul is only supported on Chromium-based browsers.
Puppeteer namespaces
Within the Puppeteer framework, we can utilize the device’s methods, network conditions, and error-handling capabilities.
To perform web application testing on specific devices, including mobile viewports, we can utilize the puppeteer.devices['DEVICE NAME']
, page.emulateNetworkConditions()
, and page.emulate()
methods.
Note: We can find all of the supported page.emulate()
APIs with code samples in the documentation.
Now, let’s try navigating to the Packt website using the following code:
Get hands-on with 1400+ tech skills courses.