| 33 | #openedPages = new Set<Target>(); |
| 34 | |
| 35 | constructor( |
| 36 | page: Page, |
| 37 | cpuTimeoutMultiplier: number, |
| 38 | networkTimeoutMultiplier: number, |
| 39 | ) { |
| 40 | this.#stableDomTimeout = 3000 * cpuTimeoutMultiplier; |
| 41 | this.#stableDomFor = 100 * cpuTimeoutMultiplier; |
| 42 | this.#expectNavigationIn = 100 * cpuTimeoutMultiplier; |
| 43 | this.#navigationTimeout = 3000 * networkTimeoutMultiplier; |
| 44 | this.#page = page as unknown as CdpPage; |
| 45 | this.#publicPage = page; |
| 46 | this.#initialUrl = page.url(); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * A wrapper that executes a action and waits for |