UNPKG

testgenius-ai

Version:

🚀 TestGenius AI - The Ultimate E2E Testing Framework for Everyone | No Coding Required • AI-Powered Automation • Beautiful Reports • Zero Complexity

29 lines • 902 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BrowserTools = void 0; class BrowserTools { constructor() { this.browser = null; } setBrowser(browser) { this.browser = browser; } async waitForElement(selector, timeout = 5000) { if (!this.browser) throw new Error('Browser not initialized'); await this.browser.$(selector).waitForExist({ timeout }); } async takeScreenshot(name) { if (!this.browser) throw new Error('Browser not initialized'); const filePath = `screenshots/${name}-${Date.now()}.png`; await this.browser.saveScreenshot(filePath); return filePath; } // Placeholder methods async init() { console.log('BrowserTools initialized'); } } exports.BrowserTools = BrowserTools; //# sourceMappingURL=BrowserTools.js.map