class BuildChartComponent { constructor(page) { this.page = page; } chartsContainer() { return this.page.locator('.chartsContainer'); } displayValue(label) { return this.page.locator('.displayContainer').filter({ hasText: label }).locator('.displayContent'); } async getHighestAlloy() { return await this.displayValue('Highest Alloy').textContent(); } async getHighestEther() { return await this.displayValue('Highest Ether').textContent(); } async getHighestPyre() { return await this.displayValue('Highest Pyre').textContent(); } async getHighestArmy() { return await this.displayValue('Highest Army').textContent(); } async getChartCount() { return await this.chartsContainer().locator('> div').count(); } } module.exports = BuildChartComponent;