Reputation: 641
Does anyone have experiance with Captcha on "WatiN" library ?
The site I want to get data is having a "captcha" on the login page. I can enter that value if app can show captcha image and wait for my input in a given text box on app.
Can we achive that from this library, if you can like to have a sample.
Upvotes: 2
Views: 911
Reputation: 53
You can integrate Watin with a captcha solving service that has an API such as http://www.deathbycaptcha.com or similar site. So you would do the following.
Upvotes: 1
Reputation: 11
ok...It seems you want to enter only captcha value manually..!!!other fields you want to automate.Ok the below solution may not be perfect but it works and its just an idea...or you can ask user to input the captcha value in an input box(use in place of msgbox),then take the value and put it in the captcha field.
IE ie=new IE();
ie.GoTo("http://captchas.net/registration/");
ie.TextField(Find.ByName("user")).Value="username";
ie.TextField(Find.ByName("mail")).Value="[email protected]";
//string captch_value="";
do
{
MessageBox.Show("Enter Captcha value...after entering correct captcha press Ok");
//captch_value=ie.Eval("window.prompt('enter captcha')");
}while(ie.ContainsText("Wrong Password entered. Try again"));
//ie.TextField(Find.ByName("password")).Value=captch_value;
ie.Button(Find.ByValue("Submit")).Click();
Upvotes: 1
Reputation: 1
As far as I know we can't automate all CAPTCHA's."Completely Automated Public Turing test to tell Computers and Humans Apart",As the name implies it is used to prevent automation.If we can automate whats the use of CAPTCHA?Only Poorly designed CAPTCHA's can be captured using complex matching algorithms.
Upvotes: 0