diff --git a/playwright-tests/pages/HomePage.ts b/playwright-tests/pages/HomePage.ts index 52ceca875..d4703c29c 100644 --- a/playwright-tests/pages/HomePage.ts +++ b/playwright-tests/pages/HomePage.ts @@ -21,7 +21,7 @@ export class HomePage extends BasePage { readonly viewQuoteButton: Locator; //Zip Entry - readonly widgetZipEntryField: Locator; + readonly widgetZipEntryInputField: Locator; readonly getQuoteAndScheduleButton: Locator; url = process.env['BASE_URL']!; @@ -30,7 +30,7 @@ export class HomePage extends BasePage { super(page); this.page = page; - this.letsGetStartedButton = this.page.getByRole('button', { name: 'Let\'s get started' }); + this.letsGetStartedButton = this.page.locator('a.zip-submit-button'); this.cusmodalPopup = this.page.locator('#Cusmodalpopup'); this.closePopupButton = this.page.getByRole('button', { name: '×' }); @@ -46,7 +46,7 @@ export class HomePage extends BasePage { this.viewQuoteButton = this.page.locator('#ctaSubmit'); //Zip Entry - this.widgetZipEntryField = this.page.getByRole('textbox', { name: 'Enter service ZIP code' }); + this.widgetZipEntryInputField = this.page.locator('input#zipcode'); this.getQuoteAndScheduleButton = this.page.getByLabel('main').getByRole('link', { name: 'Get quote + schedule' }); } @@ -61,7 +61,7 @@ export class HomePage extends BasePage { async letsGetStarted(zip: string, enterFunnelWithZip: boolean) { if (enterFunnelWithZip) { - await this.widgetZipEntryField.fill(zip); + await this.widgetZipEntryInputField.fill(zip); /* await this.letsGetStartedButton.evaluate((element, zip) => { const currentHref = element.getAttribute('href') || ''; element.setAttribute('href', `${currentHref}?zipCode=${zip}`);