(page)
| 195 | await wait(400); |
| 196 | } |
| 197 | async function explanationText(page) { |
| 198 | return (await page.locator('.cbm-chat-explanation').innerText().catch(() => '')).replace(/\n?Explain again\s*$/, '').trim(); |
| 199 | } |
| 200 | async function ask(page, question, timeout = 240000) { |
| 201 | const before = await page.locator('.cbm-chat-turn').count(); |
| 202 | const prompt = page.locator('#cbm-chat-prompt'); |