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.
Interacting with alert/prompt popup window with python