Good evening. In my application I need to send a request to a web page that needs a captcha. The image link is a .php and the captcha change every time I refresh the page. So, if I try to download the image “by link”, I have a different captcha. What is the solution? Any idea? Thank you in advance.
EDIT: Now I have to fill the input and send the request to submit. This is the html source of textfields I have to fill:
<label class="ins" for="targ">Targa del veicolo:</label>
<input id="targ" name="targa" value="" type="text" size="20" maxlength="8" tabindex="2" />
<label for="inCaptchaChars">Codice di sicurezza:</label> <input type="text" id="inCaptchaChars" name="inCaptchaChars" tabindex="1004" onblur="ShutMeDown()">
And this is about the submit button:
<input type="submit" name="procedi" value="Calcola importo" />
What I have to do to proceed? I have to use ASIHTTP?
This might be a little convoluted, but it should work alright:
Use a webView, load the page, when the page loaded call some javascript on the webview (
stringByEvaluatingJavascript) that gets the image size and offset. Resize the WebView frame to that size, and scroll the content to that offset. Disable user interaction and show the webview.To get the element offset you can use this answer
Simply call:
not that you must pass the whole code to this method
To submit the captcha:
As before, call
then do the same to call
.click()on the submit button or.submit()on the form