* Sets the initial window size. * * @param {{width: number, height: number}} size The desired window size. * @return {!Options} A self reference. * @throws {TypeError} if width or height is unspecified, not a number, or * less than or equal to 0.
({ width, height })
| 285 | * less than or equal to 0. |
| 286 | */ |
| 287 | windowSize({ width, height }) { |
| 288 | function checkArg(arg) { |
| 289 | if (typeof arg !== 'number' || arg <= 0) { |
| 290 | throw TypeError('Arguments must be {width, height} with numbers > 0') |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | checkArg(width) |
| 295 | checkArg(height) |
| 296 | return this.addArguments(`window-size=${width},${height}`) |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * List of Chrome command line switches to exclude that ChromeDriver by default |
nothing calls this directly
no test coverage detected