vendredi 8 mai 2015

Form robot to submit multiple javascript form

I have multiple form named from "form1" to "form5" within a same root url, for example 222.111.111.100/Form/. In the first page, which means

http://ift.tt/1JTGoWK

The form in the response http request would be writtin in a general style as following:

<form name="form1" action="B.do?a=first" method="post"  > 
<input name="sure" type="checkbox" id="sure" value="" /> 
<input name="submit" type="submit" value="NextStep" /> 
</form>

I need to fill the form automatically one by one as the previous form will have impact on the next one. And to be clear, after this form1, the url will trace to:

http://ift.tt/1AKvnPi

The problem is when I using cUrl to get the content, then javascript dealing with the input checkbox or submit/nextstep button, the document.forms[0].submit() for each form does not working. Even if i passed to the second page, it seems that the Global Variable have not been passed to the next page.

Sorry for poor organisation of question, I will be available for more details.

Aucun commentaire:

Enregistrer un commentaire