The user’s application has a CAPTCHA object that he needs to have a script replay against. Is there a way to capture the text that needs to be entered?
Note: CAPTCHA objects are the controls that display random text characters that the user needs to read and enter to move forward in an application. For more information on CAPTCHA objects, refer to http://www.captcha.net/.
CAPTCHA objects are designed to prevent automation, by ensuring that a human is interacting with the application, not a computer. These controls are designed to prevent automation. With this in mind, QuickTest Professional (QTP) / Unified Functional Testing (UFT) does not have a method to capture the text from the object. You will most likely need to test that portion of the application manually. Here are a couple suggestions you can consider:
1. If possible, limit the CAPTCHA control (during the testing phase) to only a few words/letter combinations. Then use QTP/UFT to cycle through these defined words/combinations. Again, this limitation on the control would only need to be done in the testing phase.
2. If possible, ask your developers to add a method which will capture the characters used in the CAPTCHA control at runtime. Then, have QTP/UFT call that method, retrieve the text, and enter it into the field as needed. Once again, this method would only need to be in place while the testing the application.
3. If possible, ask your developers to add a flag that will allow you to bypass the control during the testing phase.
4. Depending on the settings used within the CAPTCHA control, you may be able to use another application (for example, OCR software) to read the text from the image and return that text to QTP/UFT. Once QTP/UFT has the text, it can be entered into the field.