* Creates a new browser window and switches the focus for future * commands of this driver to the new window. * * @param {string} typeHint 'window' or 'tab'. The created window is not * guaranteed to be of the requested type; if the driver does not support * the requested type
(typeHint)
| 2512 | * when the driver has changed focus to the new window. |
| 2513 | */ |
| 2514 | newWindow(typeHint) { |
| 2515 | const driver = this.driver_ |
| 2516 | return this.driver_ |
| 2517 | .execute(new command.Command(command.Name.SWITCH_TO_NEW_WINDOW).setParameter('type', typeHint)) |
| 2518 | .then(function (response) { |
| 2519 | return driver.switchTo().window(response.handle) |
| 2520 | }) |
| 2521 | } |
| 2522 | |
| 2523 | /** |
| 2524 | * Changes focus to the active modal dialog, such as those opened by |
nothing calls this directly
no test coverage detected