From 4e8c24d08b5b259ee32d679cc27266bcbe2e7d8b Mon Sep 17 00:00:00 2001 From: maguire-arman Date: Thu, 29 May 2025 15:02:26 -0400 Subject: [PATCH] Handle new paypal payment flow --- playwright-tests/pages/PaypalPage.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playwright-tests/pages/PaypalPage.ts b/playwright-tests/pages/PaypalPage.ts index 7afda3d5b..4d957eb33 100644 --- a/playwright-tests/pages/PaypalPage.ts +++ b/playwright-tests/pages/PaypalPage.ts @@ -11,6 +11,7 @@ export class PaypalPage extends BasePage { readonly passwordTextBox: Locator; readonly paypalLoginButton: Locator; readonly completePurchaseButton: Locator; + readonly payWithRadioButton: Locator; readonly payButton: Locator; constructor(page: Page) { @@ -23,6 +24,7 @@ export class PaypalPage extends BasePage { this.passwordTextBox = page.getByPlaceholder('Password'); this.paypalLoginButton = page.getByRole('button', { name: 'Log In', exact: true }); this.completePurchaseButton = page.getByTestId('submit-button-initial') + this.payWithRadioButton = page.locator('.py-4').first(); this.payButton = page.getByRole('button', { name: 'Pay $' }); } @@ -42,6 +44,7 @@ export class PaypalPage extends BasePage { await this.usePasswordInsteadButton.click(); await this.passwordTextBox.fill(paymentDetails.password!); await this.paypalLoginButton.click(); + await this.payWithRadioButton.click(); await this.payButton.click(); } }