Selenium
can only be used to test a web app protected by CAPTCHA if a human
involved for the test. So, if you are automating registration form of
any site that includes a CAPTCHA, you will require human interaction
during the specific section that requires a CAPTCHA response.
There
are two ways in which you can automate CAPCHA
1.By
break command
2.By
input-box
Suppose
after command 3, there is CAPTCHA
1.By
break command
Command
1
Command
2
Command
3
4th
command will be
Break
Enter
CAPTCHA manually and resume execution of test
continue
with your next commands
2.By
input-box
Command
1
Command
2
Command
3
4th
command will be
storeEval
| prompt(“Enter value for captcha”); |variable
type
| locator of CAPTCHA field | ${variable}
continue
with your next commands
very helpful :) thanks
ReplyDeleteHow you will do it in selenium Webdriver?
ReplyDelete@venkatesh - you can refer http://stackoverflow.com/questions/8530875/get-around-capcha-in-selenium
ReplyDeleteHi, I am new to selenium and i had no idea of selenium webdriver.
ReplyDeleteCan u please tell me how to do this in Selenium-RC?
For selenium RC, please refer below code
ReplyDeleteString variable = selenium.getEval("prompt(\"Enter Value For Catpcha\")");
selenium.type("locator of CAPTCHA field", variable);
Kudos! This is very helpful. :)
ReplyDeleteHow to handle captch code using selenium webdriver
ReplyDeleteI have mentioned one URL above -
Deletehttp://stackoverflow.com/questions/8530875/get-around-capcha-in-selenium
It will may help you :)
I used the the below :
ReplyDeleteStorEval prompt("Enter value for captcha") captcha
type id=captcha ${captcha}
It captures the captcha value however at the time of submitting the form it gives an error the entered number for captcha is incorrect.
Thankx :)
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteQuestion 1:
When using 'input-box' command in IDE 2.0.0, received error with captcha despite entering correct captcha. Example: 'frammix fame'. Note the blank space in the above example. Any solution for this?
Question 2:
When using 'break' command in IDE 2.0.0, the test paused at the command 'comment'. After entering captcha value, clicking 'Pause/Resume' icon in the toolbar displayed error - unknown command: 'comment'. How should I make it work?
Thanks in advance for your help.
Both cases working fine for me.
ReplyDeleteI'm also using IDE 2.0.0
I Used Input box but i got error "[error] Element id=id('capchareset') not found"
ReplyDelete