()
| 155 | } |
| 156 | |
| 157 | dispose() { |
| 158 | this.#networkCollector.dispose(); |
| 159 | this.#consoleCollector.dispose(); |
| 160 | this.#devtoolsUniverseManager.dispose(); |
| 161 | this.#serviceWorkerConsoleCollector.dispose(); |
| 162 | for (const mcpPage of this.#mcpPages.values()) { |
| 163 | mcpPage.dispose(); |
| 164 | } |
| 165 | this.#mcpPages.clear(); |
| 166 | // Isolated contexts are intentionally not closed here. |
| 167 | // Either the entire browser will be closed or we disconnect |
| 168 | // without destroying browser state. |
| 169 | this.#isolatedContexts.clear(); |
| 170 | } |
| 171 | |
| 172 | static async from( |
| 173 | browser: Browser, |
no test coverage detected