MCPcopy Create free account
hub / github.com/GCWing/BitFun / waitForPageLoad

Method waitForPageLoad

tests/e2e/page-objects/BasePage.ts:8–19  ·  view source on GitHub ↗
(timeout: number = environmentSettings.pageLoadTimeout)

Source from the content-addressed store, hash-verified

6
7export class BasePage {
8 async waitForPageLoad(timeout: number = environmentSettings.pageLoadTimeout): Promise<void> {
9 await browser.waitUntil(
10 async () => {
11 const readyState = await browser.execute(() => document.readyState);
12 return readyState === 'complete';
13 },
14 {
15 timeout,
16 timeoutMsg: `Page did not load within ${timeout}ms`,
17 }
18 );
19 }
20
21 async getByTestId(testId: string): Promise<WebdriverIO.Element> {
22 return $(`[data-testid="${testId}"]`);

Callers 2

waitForLoadMethod · 0.80
waitForLoadMethod · 0.80

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected