| 1210 | } |
| 1211 | |
| 1212 | export function getRedboxDescription( |
| 1213 | browser: Playwright |
| 1214 | ): Promise<string | null> { |
| 1215 | return browser.eval(() => { |
| 1216 | const portal = [].slice |
| 1217 | .call(document.querySelectorAll('nextjs-portal')) |
| 1218 | .find((p) => p.shadowRoot.querySelector('[data-nextjs-dialog-header]')) |
| 1219 | const root = portal.shadowRoot |
| 1220 | return ( |
| 1221 | root.querySelector('#nextjs__container_errors_desc')?.innerText ?? null |
| 1222 | ) |
| 1223 | }) |
| 1224 | } |
| 1225 | |
| 1226 | export function getRedboxErrorCode( |
| 1227 | browser: Playwright |