MCPcopy
hub / github.com/codeceptjs/CodeceptJS / closeCurrentTab

Method closeCurrentTab

lib/helper/Puppeteer.js:1143–1148  ·  view source on GitHub ↗

* Close current tab and switches to previous. * * ```js * I.closeCurrentTab(); * ```

()

Source from the content-addressed store, hash-verified

1141 * ```
1142 */
1143 async closeCurrentTab() {
1144 const oldPage = this.page
1145 await this.switchToPreviousTab()
1146 await oldPage.close()
1147 return this._waitForAction()
1148 }
1149
1150 /**
1151 * Close all tabs except for the current one.

Calls 2

switchToPreviousTabMethod · 0.95
_waitForActionMethod · 0.95

Tested by

no test coverage detected