Update locator to fix flakiness when selecting address

This commit is contained in:
JennyNou 2026-04-08 09:46:19 -04:00
parent 6b07ec4c33
commit b9f6372a68

View file

@ -48,8 +48,8 @@ export class PolicyHolderDetailsPage extends BasePage {
await this.addressInputBox.pressSequentially(customerDetails.address.street);
// Wait for suggestions to load (Google Places has a slight delay)
await this.page.locator('.pac-item').first().waitFor({ state: 'visible', timeout: 6000 });
await this.page.locator('.pac-item').first().waitFor({ state: 'attached', timeout: 6000 });
await this.page.locator('.pac-item').first().isVisible();
// Click the first result
await this.page.locator('.pac-item').first().click();