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 am unable to write manually captcha code by using simple wait() command , as it throws java.lang.IllegalMonitorStateException
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.