-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: Change div role:link to link or button #390
Comments
Hi @gersanco, you'll need to wait for the PayPal iframe to be loaded, and then switch context into the PayPal iframe to verify that this dom-ready class has been added. That way you can know for sure that the PayPal buttons are fully loaded and ready for interaction |
Hello @devchristina, I'm waiting, the thing is that sometimes when I click the PayPal link button, it doesn't do anything and I have to press it again.
This is a test that I created using Playwright, most of the time it works, but at some random moments click on it but, it doesn't open the popup, instead bordering the button with a blue line like it was selected. For that reason, I added a delay of 2000 milliseconds but, It sometimes fails. |
Hi @gersanco, its great to see you leveraging Playwright for e2e tests. Can you try adding a locator for the await page
.frameLocator('iframe[name^="__zoid__paypal_buttons"]')
// this class gets added to the iframe body after the JavaScript has finished executing
.locator('body.dom-ready')
.getByRole('link', { name: 'PayPal' })
.click({ delay: 2000 }); This paypal buttons iframe is a html document with inline javascript inside of it. It's best to wait for all of that inline javascript to finish executing before clicking on the button. Please let us know if that helps make the click action more reliable. |
Hi @gregjopa, sure, I will include it, I will test a lot if that solves. I hope coming back with great news 😄 |
Hello @gregjopa, I have been trying with your suggestion and no errors. Thanks a lot 🎊 😄 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
Hello,
I'm using Playwright to create an e2e test and sometimes when I execute my tests doesn't work because it doesn't click on the Paypal button, I think this is due to it being a div and it not catching the click event properly.
Describe the solution you'd like
Instead of being div role="link" use a button or a link. Also, include the disable to the element just to help the e2e test.
Describe alternatives you've considered
I tried with this
But, the error still happens randomly
➕ Anything else?
No response
The text was updated successfully, but these errors were encountered: