diff --git a/playwright-tests/pages/HomePage.ts b/playwright-tests/pages/HomePage.ts index 1b9a63301..1b681f0e3 100644 --- a/playwright-tests/pages/HomePage.ts +++ b/playwright-tests/pages/HomePage.ts @@ -5,6 +5,8 @@ export class HomePage extends BasePage { readonly page: Page; readonly letsGetStartedButton: Locator; + readonly cusmodalPopup: Locator; + readonly closePopupButton: Locator; //Quick Quote (LeadGen) Form readonly yearDropdown: Locator; @@ -29,6 +31,8 @@ export class HomePage extends BasePage { this.page = page; this.letsGetStartedButton = this.page.locator('a.btn.btn-primary.ghost'); + this.cusmodalPopup = this.page.locator('#Cusmodalpopup'); + this.closePopupButton = this.page.getByRole('button', { name: '×' }); //Quick Quote (LeadGen) Form this.yearDropdown = this.page.locator('#year'); @@ -63,6 +67,10 @@ export class HomePage extends BasePage { element.setAttribute('href', `${currentHref}&zipCode=${zip}`); }, zip); } + + if (await this.cusmodalPopup.isVisible()) { + await this.closePopupButton.click(); + } await this.letsGetStartedButton.click(); }