From 0a9e7c789c1be0add75ffc4af97b29a7a39d7671 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 18 Mar 2026 14:33:26 -0400 Subject: [PATCH 1/2] Update locators for content homepage --- playwright-tests/pages/HomePage.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/playwright-tests/pages/HomePage.ts b/playwright-tests/pages/HomePage.ts index e2db5ac26..d88c27fe5 100644 --- a/playwright-tests/pages/HomePage.ts +++ b/playwright-tests/pages/HomePage.ts @@ -20,8 +20,7 @@ export class HomePage extends BasePage { readonly paymentOptionDropdown: Locator; readonly viewQuoteButton: Locator; - //Zip Entry - readonly enterServiceZipTextBox: Locator; + //Zip Entry readonly zipEntryLetsGetStartedButton: Locator; readonly getQuoteAndScheduleButton: Locator; @@ -31,7 +30,7 @@ export class HomePage extends BasePage { super(page); this.page = page; - this.letsGetStartedButton = this.page.locator('#zipCodeTextboxButton'); + this.letsGetStartedButton = this.page.getByRole('button', { name: 'Let\'s get started' }); this.cusmodalPopup = this.page.locator('#Cusmodalpopup'); this.closePopupButton = this.page.getByRole('button', { name: '×' }); @@ -47,8 +46,7 @@ export class HomePage extends BasePage { this.viewQuoteButton = this.page.locator('#ctaSubmit'); //Zip Entry - this.enterServiceZipTextBox = this.page.locator('#zipCodeTextbox'); - this.zipEntryLetsGetStartedButton = this.page.locator('#zipCodeTextbox'); + this.zipEntryLetsGetStartedButton = this.page.getByRole('textbox', { name: 'Enter service ZIP code' }); this.getQuoteAndScheduleButton = this.page.getByLabel('main').getByRole('link', { name: 'Get quote + schedule' }); } From 48ad72d996b2d3a853b058df4411d59257c190e0 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 18 Mar 2026 14:38:29 -0400 Subject: [PATCH 2/2] Rename locator for readability --- playwright-tests/pages/HomePage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright-tests/pages/HomePage.ts b/playwright-tests/pages/HomePage.ts index d88c27fe5..52ceca875 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 zipEntryLetsGetStartedButton: Locator; + readonly widgetZipEntryField: Locator; readonly getQuoteAndScheduleButton: Locator; url = process.env['BASE_URL']!; @@ -46,7 +46,7 @@ export class HomePage extends BasePage { this.viewQuoteButton = this.page.locator('#ctaSubmit'); //Zip Entry - this.zipEntryLetsGetStartedButton = this.page.getByRole('textbox', { name: 'Enter service ZIP code' }); + this.widgetZipEntryField = this.page.getByRole('textbox', { name: 'Enter service ZIP code' }); 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.zipEntryLetsGetStartedButton.fill(zip); + await this.widgetZipEntryField.fill(zip); /* await this.letsGetStartedButton.evaluate((element, zip) => { const currentHref = element.getAttribute('href') || ''; element.setAttribute('href', `${currentHref}?zipCode=${zip}`);