* @param {Page} page * @param {string} url * @param {WaitForOptions} gotoOptions * @returns Promise which resolves when page loads
(url, gotoOptions)
| 182 | * @returns Promise which resolves when page loads |
| 183 | */ |
| 184 | async pageGoto(url, gotoOptions) { |
| 185 | // Normalize URL |
| 186 | const pathname = new URL(url).pathname; |
| 187 | // Depending on external circumstances, page may connect to server before page.goto() reolves |
| 188 | const promise = this.awaitForEvent(`ready-${pathname}`); |
| 189 | await this.page.goto(url, gotoOptions); |
| 190 | await promise; |
| 191 | } |
| 192 | |
| 193 | async openTestPage(url, gotoOptions) { |
| 194 | await this.page.bringToFront(); |
no test coverage detected