Update README to reflect WIP

This commit is contained in:
2025-08-18 18:42:38 -04:00
parent a698b85c51
commit 1eb0637d38
14 changed files with 576 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
import { browser } from '@wdio/globals';
export enum DocumentReadyState {
Loading = 'Loading',
Interactive = 'Interactive',
Completed = 'Completed'
}
export async function waitUntilDocumentReadyState(waitForReadyState: DocumentReadyState): Promise<void> {
await browser.waitUntil(() => browser.execute(`document.readyState === "${DocumentReadyState[waitForReadyState]}"`) as Promise<boolean>, {
timeout: 10000,
timeoutMsg: `Document did not have a readyState of [${waitForReadyState}] after [10] seconds`,
interval: 1000
});
}