export default class BasePage { async waitForElement(selector: string, timeout: number = 10000) { const element = await $(selector); await element.waitForDisplayed({ timeout }); return element; } async clickElement(selector: string) { const element = await this.waitForElement(selector); await element.click(); } async enterText(selector: string, text: string) { const element = await this.waitForElement(selector); await element.setValue(text); } async getText(selector: string): Promise { const element = await this.waitForElement(selector); return await element.getText(); } async isElementDisplayed(selector: string): Promise { try { const element = await $(selector); return await element.isDisplayed(); } catch (error) { return false; } } }