I’m trying to simulate the entry of a string in a textbox on a web form, submit that form, and then receive the result back from the server. The idea is to allow the user to input the relevant form field in a native iOS control, and then grab the data they’re after for them (it requires a few intermediate steps).
The site in question is this: https://www.sinet.uq.edu.au/psp/ps/EMPLOYEE/HRMS/c/UQMY_GUEST.UQMY_GUEST_TTBLE.GBL
I want to provide values for the ‘select semester’ dropdown (id=”UQ_DRV_TT_GUEST_STRM”), and for the ‘course code’ textbox (id=”UQ_DRV_CRSE_SRC_UQ_SUBJECT_SRCH”).
To submit, I want to simulate hitting the ‘Search’ button at the bottom of the page (id=”UQ_DRV_TT_GUEST_UQ_SEARCH_PB”, onclick=”hAction_win0(document.win0,’UQ_DRV_TT_GUEST_UQ_SEARCH_PB’, 0, 0, ‘Search’, false, true);”).
I’ve looked into using an ASIFormDataRequest object from the ASIHTTPRequest library to send through POST values, but either I’m getting the key/value pairs wrong or I’m approaching this in the wrong way.
If someone could point me in the right direction that’d be great. In particular, should I be somehow running the hAction_win0(…) call, and if so, how would I set the appropriate values? If this isn’t necessary, what should the POST values be?
Thanks 🙂
you can use a JavaScript to set the values, use following code to evaluate it in browser: