I'm trying to test an application where a user enters information into a gui, clicks on save button and then has to click "ok" in an alert/prompt popup window for the request to take place to the web service.
I'm using a python script to automate the requests to the web service.
My question is: after submitting the user information how can I interact with the alert/prompt popup to click the "ok" button so that the request completes. How is this being done within a python script.
I'm grateful for any input
Javascript is just a client-side thing. It doesn't matter what you select in the alert box. If you press Cancel, it won't happen but if you press OK, it will POST the form data.
You don't need to emulate a button press of OK. So, what really matters is to sniff the POST data. For that you can use Firebug (in Firefox) or Developer Tools (in Chrome) to sniff the POST parameters by using the Network tab.
If it is using web browser or any XHTML+ javascript based layout engine(webkit, KHTML, gecko), you can use selenium
homepage
see also
there are also others like
windmill
twill
and pamie for windows
I have used selenium which is pretty good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With