* Create a new browser context with a page. \ * Usually it should be run from a custom helper after call of `_startBrowser()` * @param {object} [contextOptions] See https://playwright.dev/docs/api/class-browser#browser-new-context
(contextOptions)
| 1211 | * @param {object} [contextOptions] See https://playwright.dev/docs/api/class-browser#browser-new-context |
| 1212 | */ |
| 1213 | async _createContextPage(contextOptions) { |
| 1214 | if (!this.browser) { |
| 1215 | throw new Error('Browser not started. Call _startBrowser() first or disable manualStart option.') |
| 1216 | } |
| 1217 | this.browserContext = await this.browser.newContext(contextOptions) |
| 1218 | |
| 1219 | const page = await this.browserContext.newPage() |
| 1220 | targetCreatedHandler.call(this, page) |
| 1221 | await this._setPage(page) |
| 1222 | } |
| 1223 | |
| 1224 | _getType() { |
| 1225 | return this.browser._type |
no test coverage detected