MCPcopy Create free account
hub / github.com/appium/appium / refreshSessionData

Method refreshSessionData

packages/fake-plugin/lib/plugin.ts:213–217  ·  view source on GitHub ↗

* Example for bounded work started outside Appium's plugin command chain, such as an IPC callback. * Ordinary command handlers, including work after await next(), are already protected by Appium. * The helper suspends idle expiry through retrieval and the session-data update, then resumes it

(driver: DriverLike, fetchData: () => Promise<unknown>)

Source from the content-addressed store, hash-verified

211 * @see ../test/unit/command-timeout.spec.ts for success, failure, overlap, and idle expiry tests.
212 */
213 async refreshSessionData(driver: DriverLike, fetchData: () => Promise<unknown>): Promise<void> {
214 await runWithCommandTimeout(driver, async () => {
215 driver.fakeSessionData = await fetchData();
216 });
217 }
218
219 async getFakeSessionData(_next: () => Promise<unknown>, driver: DriverLike): Promise<unknown> {
220 await sleep(1);

Callers 1

Calls 1

runWithCommandTimeoutFunction · 0.85

Tested by

no test coverage detected