* * Unlike other drivers Playwright changes the size of a viewport, not the window! * Playwright does not control the window of a browser, so it can't adjust its real size. * It also can't maximize a window. * * Update configuration to change real window size on start: * * ```js
(width, height)
| 1468 | * {{> resizeWindow }} |
| 1469 | */ |
| 1470 | async resizeWindow(width, height) { |
| 1471 | if (width === 'maximize') { |
| 1472 | throw new Error("Playwright can't control windows, so it can't maximize it") |
| 1473 | } |
| 1474 | |
| 1475 | await this.page.setViewportSize({ width, height }) |
| 1476 | return this._waitForAction() |
| 1477 | } |
| 1478 | |
| 1479 | /** |
| 1480 | * Set headers for all next requests |
nothing calls this directly
no test coverage detected