RE: How to do automation when captcha is provided

What to write in scripts when you come across a form which accepts captcha then only it can submit.
I do not want to modify test environment so that developers remove the functionality not I need a secret captcha which runs every time.

I was thinking that we can use javascript alert for indicating user to enter captcha manually. But how to implement that with selenium web-driver and testng

I am unable to write manually captcha code by using simple wait() command , as it throws java.lang.IllegalMonitorStateException

sk Train Asked on September 1, 2014 in Selenium WebDriver.
Add Comment
3 Answers

Hi skatkoria,

You can also put a dialog box which accepts a text value and let this value be the entered by the user. This way you will your pop up will serve two purposes.

Also, usually captcha has two setting, Live and Test. In test settings instead of the image being displayed it displays the text which can be fetched using Selenium. You can ask your development team to turn on this feature so that your tests can be fully automated.

Thanks
Virender

Professor Answered on September 1, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.