Update HomePage.ts

This commit is contained in:
kpatel8hs4io 2026-05-03 12:15:16 -04:00
parent 436491da84
commit f36b7a8e70

View file

@ -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}`);