| 249 | } |
| 250 | |
| 251 | async waitForNone(selector: string, root?: puppeteer.ElementHandle, asyncScope = new AsyncScope(), handler?: string) { |
| 252 | return await asyncScope.exec(() => this.waitForFunction(async () => { |
| 253 | const elements = await this.$$(selector, root, handler); |
| 254 | if (elements.length === 0) { |
| 255 | return true; |
| 256 | } |
| 257 | return false; |
| 258 | }, asyncScope, `Waiting for no elements to match selector '${handler ? `${handler}/` : ''}${selector}'`)); |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * @deprecated This method is not able to recover from unstable DOM. Use click(selector) instead. |