I'm attempting to automate a payment system, where the "Pay with PayPal" button is within an iFrame. I've searched through TestCafe's support pages, and can't seem to resolve the issue.
TestCafe believes it has clicked on the button, and so fails at the next step (enter email address).
What I'm using:
const payPalFrame = Selector('#paypal-button iframe');
const payPalButton = Selector('[name="paypal"]')
async payWithPaypal () {
await t
.switchToIframe(payPalFrame)
.click(payPalButton)
.switchToMainWindow();
}
I tried to write a ClientFunction, but still relatively new to JS/Node and couldn't get anything to work.