Open Alex2357 opened 10 years ago
Does your Web Driver run JavaScript on the page? PoliteCaptcha is designed to only show a CAPTCHA if the browser is not running JavaScript. Most spam bots do not run JavaScript, so if you use a JavaScript-enabled user-agent, this is by-design.
Yes, it runs javascript. It is Selenium WebDriver. Nice to have trivial check for Selenium.
If a SPAMer wanted to SPAM your site then using Selenium or similar would easily get around this solution. I cant see how this can be considered a real solution. Granted it stops many bots but if your a site of interest its not much work to spin up Selenium or similar.
This simple thing always passes using (IWebDriver driver = TestHelper.CreateDriver()) { //var url = @"http://politecaptcha.apphb.com/Home/WithBypass"; //var url = @"http://politecaptcha.apphb.com/Home/WithFallback"; var url = @"http://politecaptcha.apphb.com/Home/WithoutFallback"; driver.Navigate().GoToUrl(url); var email = driver.FindElement(By.Id("EmailAddress")); email.SendKeys("a@yahoo.com");