Skip to main content

4 docs tagged with "bidi"

View all tags

Block Slow Third-Party Requests

Pages load resources that are not relevant to the functionality we test (analytics, social widgets, ads). When they load slowly, they slow down our tests or make them fail. WebDriver BiDi lets the test block them.

How to Capture Console Logs and JavaScript Errors

A page that logs an error to the console, or throws a JavaScript error, can look fine while it is broken. With WebDriver BiDi, the test gets the console messages and the errors of the page as they happen, and can check them.

How to Mock Network Responses

A page that loads its data from an API is hard to test: the API can be slow, down, or return data that changes. The test can answer the API calls itself, with the data it chooses, and check how the page shows it.

How to Turn a Selenium Test into a Load Test

Our Selenium tests already walk through the main journeys of our users. With WebDriver BiDi, a test can record the requests of a journey in a HAR file, and a load testing tool like k6 can replay them with many virtual users.