Update locator to fix flakiness when selecting address
This commit is contained in:
parent
6b07ec4c33
commit
b9f6372a68
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue