MCPcopy Create free account
hub / github.com/darkreader/darkreader / pageGoto

Method pageGoto

tests/browser/environment.js:184–191  ·  view source on GitHub ↗

* @param {Page} page * @param {string} url * @param {WaitForOptions} gotoOptions * @returns Promise which resolves when page loads

(url, gotoOptions)

Source from the content-addressed store, hash-verified

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();

Callers 1

openTestPageMethod · 0.95

Calls 1

awaitForEventMethod · 0.95

Tested by

no test coverage detected