* Close current tab and switches to previous. * * ```js * I.closeCurrentTab(); * ```
()
| 1904 | * ``` |
| 1905 | */ |
| 1906 | async closeCurrentTab() { |
| 1907 | if (this.isElectron) { |
| 1908 | throw new Error('Cannot close current tab inside an Electron container') |
| 1909 | } |
| 1910 | const oldPage = this.page |
| 1911 | await this.switchToPreviousTab() |
| 1912 | await oldPage.close() |
| 1913 | return this._waitForAction() |
| 1914 | } |
| 1915 | |
| 1916 | /** |
| 1917 | * Close all tabs except for the current one. |
nothing calls this directly
no test coverage detected