()
| 701 | } |
| 702 | |
| 703 | async _after() { |
| 704 | if (!this.isRunning) return |
| 705 | if (this.options.restart) { |
| 706 | this.isRunning = false |
| 707 | return this.browser.deleteSession() |
| 708 | } |
| 709 | if (this.browser.isInsideFrame) await this.browser.switchFrame(null) |
| 710 | |
| 711 | if (this.options.keepBrowserState) return |
| 712 | |
| 713 | if (!this.options.keepCookies && this.options.capabilities.browserName) { |
| 714 | this.debugSection('Session', 'cleaning cookies and localStorage') |
| 715 | await this.browser.deleteCookies() |
| 716 | } |
| 717 | await this.browser.execute('localStorage.clear();').catch(err => { |
| 718 | if (!(err.message.indexOf("Storage is disabled inside 'data:' URLs.") > -1)) throw err |
| 719 | }) |
| 720 | await this.closeOtherTabs() |
| 721 | browserLogs = [] |
| 722 | return this.browser |
| 723 | } |
| 724 | |
| 725 | _afterSuite() {} |
| 726 |
nothing calls this directly
no test coverage detected