Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GoTesla's avatar

How to test browser functionality of popups (such as for Payment Request API)

How can I write browser tests for modals like this?

enter image description here

In case it matters, I'm using Laravel 5.6 Dusk for browser testing, and my payment request modal is generated via a Stripe Payment Request Button.

Stripe's Payment Request Button uses the cross-browser Payment Request API from W3C.

Chrome doesn't let me "inspect" the HTML of the elements of the modal, so I'm not sure how to write compatible commands in the form of $browser->click('.selector');.

See https://stackoverflow.com/q/50070977/470749

0 likes
3 replies
jlrdw's avatar

I use browserstack.

Generally speaking, good css and proper media queries if that applies or not equals it works properly.

jlrdw's avatar

I manually test, literally login and just randomly check several different operating systems and browser combinations.

You could see if they have support and help for what you need.

Please or to participate in this conversation.