Pylons / webtest

Wraps any WSGI application and makes it easy to send test requests to that application, without starting up an HTTP server.
https://docs.pylonsproject.org/projects/webtest/en/latest/
Other
335 stars 109 forks source link

Is there any way to open a popup form when click? #233

Closed thoongnv closed 3 years ago

thoongnv commented 3 years ago
<button type="submit" class="stripe-button-el" style="visibility: visible;">
    <span style="display: block; min-height: 30px;">Open popup form</span>
</button>

In the UI, when click the above button Stripe checkout will build the form, I fill and submit it after that?

As I see the current webtest, click, clickbutton behavior (in webtest/response.py) will go to a URL so is there any way to open a popup form?

stevepiercy commented 3 years ago

It looks like the answer is that webtest does not do what you want. See https://docs.pylonsproject.org/projects/webtest/en/latest/api.html#webtest.response.TestResponse.click and https://docs.pylonsproject.org/projects/webtest/en/latest/api.html#webtest.response.TestResponse.clickbutton.

I think that Selenium will do what you want, but even that is tricky for this situation.

thoongnv commented 3 years ago

thanks @stevepiercy, let me check this with Selenium