Blocking Proxy is a specialized network proxy designed to enhance WebDriver-based test suites, particularly for rich client applications. It operates by intercepting WebDriver commands between the test runner and the Selenium Server, allowing for the injection of custom logic. Its primary utility, especially for applications built with Angular, is to automatically pause WebDriver commands until Angular's change detection cycles are finished, thereby significantly reducing test flakiness caused by asynchronous UI updates. The current stable version is 1.0.1, last published in 2017. While it originated within the Angular ecosystem, its development appears to be in maintenance mode, with no significant recent updates. Key differentiators include its language-agnostic network-level interaction, features like 'Wait for Angular,' highlight delay for visual debugging, and detailed WebDriver command logging. It is intended to be run as a separate process alongside a Selenium server, not as an embedded library within the test runner itself.
npm install blocking-proxyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically start Blocking Proxy and configure a Selenium WebDriver instance to route its commands through it, enabling features like 'Wait for Angular' and highlighting.
Ensure that your test runner or CI/CD setup provisions a dedicated Blocking Proxy instance for each parallel browser session or test suite run.
Before starting Blocking Proxy, ensure your Selenium Server is active and accessible at the `seleniumAddress` configured for the proxy. You can use `webdriver-manager start` or a similar tool.
Verify that `waitForAngular` is effectively synchronizing with your application's framework. For non-Angular or newer Angular applications, consider if the proxy's other features (logging, highlight delay) justify its use, or explore alternative synchronization methods.
Ensure that your Selenium Server is running and accessible on `http://localhost:4444/wd/hub` (or the address configured for `seleniumAddress`) before starting Blocking Proxy.
Verify that your Angular application is correctly instrumented for `waitForAngular`. If the issue persists, consider adding explicit waits (e.g., `driver.wait(until.elementLocated(...))`) in your test code, or debugging your application's Zone.js integration if applicable.
Change the `proxyPort` configuration to an unused port number (e.g., `8081`). You can check available ports using `netstat -an | grep <port>` on Linux/macOS or `netstat -ano | findstr :<port>` on Windows.
No dependency data recorded yet.