Straight answer – CAPTCHA cannot be automated. If you could, then CAPTCHA concept is failed.

If you are aware, CAPTCHA tells your computer that you are a human being, and  not a script. But testers have many challenges during the time when CAPTCHA need to be handled in Automation.

If you are a tester and need to Automate a page that has CAPTCHA in it and the page requires to continuous integration, ever wondered how to handle it your test environments?

Initially, there were times i used to manually enter the CAPTCHA when the script runs.

May be i have few thoughts in my mind to handle it:

  1. Propably, you can ask your developement team to remove the CAPTCHA feature in your test environment only and then Automate the rest of the journey in that particular page.
  2. Alternatively, ask your development team to design the CAPTCHA model in your webpage, that the page always should populate same keyword. This keyword can be hardcoded in your script
  3. If the page doesn’t require continuous integration, you can enter the CAPTCHA manually during the test run

Hope this helps!