(context: BrowserContext, extensionId: string, params?: string)
| 112 | |
| 113 | /** Open the script editor page */ |
| 114 | export async function openEditorPage(context: BrowserContext, extensionId: string, params?: string): Promise<Page> { |
| 115 | const page = await context.newPage(); |
| 116 | const hash = params ? `#/script/editor?${params}` : "#/script/editor"; |
| 117 | await page.goto(`chrome-extension://${extensionId}/src/options.html${hash}`); |
| 118 | await page.waitForLoadState("domcontentloaded"); |
| 119 | return page; |
| 120 | } |
| 121 | |
| 122 | async function focusMonacoEditor(page: Page): Promise<void> { |
| 123 | await page.locator(".monaco-editor").waitFor({ timeout: 30_000 }); |
no outgoing calls