(row)
| 523 | } |
| 524 | |
| 525 | async function openRowAndGetMessageText(row) { |
| 526 | simulateClick(row); |
| 527 | |
| 528 | for (let i = 0; i < 20; i++) { |
| 529 | const messageContainer = document.querySelector('div[role="main"] .a3s, div[role="main"] [data-message-id], h2[data-thread-perm-id]'); |
| 530 | if (messageContainer || !/#inbox/i.test(location.href)) { |
| 531 | break; |
| 532 | } |
| 533 | await sleep(250); |
| 534 | } |
| 535 | |
| 536 | await sleep(900); |
| 537 | const main = document.querySelector('div[role="main"]'); |
| 538 | const text = normalizeText(main?.innerText || document.body?.innerText || document.body?.textContent || ''); |
| 539 | await returnToInbox(); |
| 540 | return text; |
| 541 | } |
| 542 | |
| 543 | async function handlePollEmail(step, payload) { |
| 544 | const { |
no test coverage detected