MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / setSystemTime

Method setSystemTime

packages/webdriverio/src/clock.ts:148–151  ·  view source on GitHub ↗

* Change the system time to the new now. Now can be a timestamp, date object, or not passed in which defaults * to 0. No timers will be called, nor will the time left before they trigger change. * * ```ts * it('should set the system time', async () => { * const clock = awa

(date: number | Date)

Source from the content-addressed store, hash-verified

146 * @returns {Promise<void>}
147 */
148 async setSystemTime(date: number | Date) {
149 const serializableSystemTime = date instanceof Date ? date.getTime() : date
150 await this.#browser.execute((date) => window.__clock.setSystemTime(date), serializableSystemTime)
151 }
152}

Calls

no outgoing calls

Tested by

no test coverage detected