UNPKG

webdriverio-automation

Version:

WebdriverIO-Automation android ios project

30 lines (23 loc) 481 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; class ElementStore { constructor() { this.index = 0; this.elementMap = new Map(); } set(elementHandle) { const index = `ELEMENT-${++this.index}`; this.elementMap.set(index, elementHandle); return index; } get(index) { return this.elementMap.get(index); } clear() { this.elementMap.clear(); } } exports.default = ElementStore;