Update HomePage.ts
This commit is contained in:
parent
436491da84
commit
f36b7a8e70
1 changed files with 4 additions and 4 deletions
|
|
@ -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}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue