Handle new paypal payment flow
This commit is contained in:
parent
05e5060a5a
commit
4e8c24d08b
1 changed files with 3 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue