clean up
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { browser } from '@wdio/globals';
|
||||
import {browser} from '@wdio/globals';
|
||||
|
||||
export enum DocumentReadyState {
|
||||
Loading = 'Loading',
|
||||
@@ -7,9 +7,9 @@ export enum DocumentReadyState {
|
||||
}
|
||||
|
||||
export async function waitUntilDocumentReadyState(waitForReadyState: DocumentReadyState): Promise<void> {
|
||||
await browser.waitUntil(() => browser.execute(`document.readyState === "${DocumentReadyState[waitForReadyState]}"`) as Promise<boolean>, {
|
||||
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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user