testgenius-ai
Version:
🚀 TestGenius AI - The Ultimate E2E Testing Framework for Everyone | No Coding Required • AI-Powered Automation • Beautiful Reports • Zero Complexity
31 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VerificationTools = void 0;
class VerificationTools {
constructor() {
this.browser = null;
}
setBrowser(browser) {
this.browser = browser;
}
async verifyText(text) {
if (!this.browser)
throw new Error('Browser not initialized');
const pageSource = await this.browser.getPageSource();
if (!pageSource.includes(text))
throw new Error(`Text not found: ${text}`);
}
async verifyElement(selector) {
if (!this.browser)
throw new Error('Browser not initialized');
const exists = await this.browser.$(selector).isExisting();
if (!exists)
throw new Error(`Element not found: ${selector}`);
}
// Placeholder methods
async init() {
console.log('VerificationTools initialized');
}
}
exports.VerificationTools = VerificationTools;
//# sourceMappingURL=VerificationTools.js.map