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(); } }