|
| 1 | +--- |
| 2 | +title: Automating Captcha in Telerik Test Studio |
| 3 | +description: Learn possible solutions for handling Captcha during automation testing in Telerik Test Studio. |
| 4 | +type: how-to |
| 5 | +page_title: Handling Captcha Challenges in Automation Using Telerik Test Studio |
| 6 | +meta_title: Handling Captcha Challenges in Automation Using Telerik Test Studio |
| 7 | +slug: automating-captcha-in-telerik-test-studio |
| 8 | +tags: telerik test studio, captcha, automation, find logic, search by image |
| 9 | +res_type: kb |
| 10 | +ticketid: 1675222 |
| 11 | +--- |
| 12 | + |
| 13 | + |
| 14 | +## Description |
| 15 | + |
| 16 | +I need to automate a process that involves solving a Captcha as part of the steps. Is there any solution or workaround to achieve this during automation testing? |
| 17 | + |
| 18 | +This knowledge base article also answers the following questions: |
| 19 | +- How to bypass Captcha during automation testing? |
| 20 | +- What are the options for handling Captcha in Telerik Test Studio? |
| 21 | +- Can Captcha be automated in test environments? |
| 22 | + |
| 23 | +## Solution |
| 24 | + |
| 25 | +Captchas are specifically designed to prevent automation for security purposes, including tools like Telerik Test Studio. However, there are alternative approaches you can consider during testing: |
| 26 | + |
| 27 | +1. **Whitelist Company Test IP:** Add your company's or test machine’s IP to the trusted list to bypass Captcha verification during testing. |
| 28 | + |
| 29 | +2. **Disable Captcha in Test Environment:** Turn off Captcha in testing environments such as staging or development while keeping it enabled in production. |
| 30 | + |
| 31 | +3. **Use Image-Based Element Identification:** For certain weak Captchas, you might use image-based element identification. This should only be a last resort if other options are unavailable. |
| 32 | + |
| 33 | + - To identify an element by image for a single test step, enable `SearchByImageFirst` in the [step properties](https://docs.telerik.com/teststudio/features/test-maintenance/test-step-properties). |
| 34 | + - To set image-based identification for the entire project, enable the checkbox `Search by image first` in the [Find Logic project settings](https://docs.telerik.com/teststudio/features/project-settings/find-logic). |
| 35 | + |
| 36 | + Learn more about [element identification by image](https://docs.telerik.com/teststudio/automated-tests/elements/elements-find-expression#elements-image). |
| 37 | + |
| 38 | +Discuss the most suitable approach with your development team to align with your requirements. |
| 39 | + |
| 40 | +## See Also |
| 41 | + |
| 42 | +- [Step Properties in Telerik Test Studio](https://docs.telerik.com/teststudio/features/test-maintenance/test-step-properties) |
| 43 | +- [Find Logic Project Settings](https://docs.telerik.com/teststudio/features/project-settings/find-logic) |
| 44 | +- [Element Identification by Image in Telerik Test Studio](https://docs.telerik.com/teststudio/automated-tests/elements/elements-find-expression#elements-image) |
0 commit comments