Reputation: 1
It is required for me to capture the text present on the recaptcha image and type the same in a text box. Can any one please share me the solution how can we do this using selenium rc or webdriver and share me the code also using java.
Upvotes: 0
Views: 4523
Reputation: 15413
There is additional solution i described here and it's to use CAPTCHA solver services API.
For example: http://www.deathbycaptcha.com. You implementing their API, passing them the CAPTCHA and get in return the text.
Example for implementation here.
Upvotes: 0
Reputation: 25056
If it were possible, what would be the point of CAPTCHA images? If you bypass it in Selenium, what's stopping an attacker doing that? This is not possible, for very good reasons.
Instead just disable CAPTCHA for your test environment.
Upvotes: 1
Reputation: 2002
You can not automate captcha, but there is some way to deal with captcha but for that human interaction is required.
There are two ways in which you can automate CAPTCHA
1.By break command
2.By input-box
For input box
String captcha = selenium.getEval("prompt("Enter Captcha")");
selenium.type("fieldId", captcha);
Upvotes: 1
Reputation: 4803
If it's possible to "cheat" in your test environment I would have the expected value added to a hidden field and pull from there.
Upvotes: 0