ashu
ashu

Reputation: 507

how to pass through the captcha while testing an application on an automation tool like QTP

how to avoid(alternative) captcha while testing an application on any tool. I am testing an application on QTP .It's having captcha on the login screen Since captcha is an image therefore the tool is unable to read it for repeated iterations. Is there any way to pass through the captcha.

Upvotes: 1

Views: 2985

Answers (4)

Aas Ahsan
Aas Ahsan

Reputation: 1

There is a simpler way to to handle CAPTCHA on a webpage in QTP/UFT through "dynamic execution of data" used in the parametrization technique.

Upvotes: -2

Nitin Rastogi
Nitin Rastogi

Reputation: 171

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.

Upvotes: 1

Motti
Motti

Reputation: 114805

The whole point of CAPTCHA1 is to make sure a real human is facing the computer so if QTP could solve a general CAPTCHA it would mean that the whole concept of CAPTCHAs is flawed.

On a case to case basis there may be a solution (perhaps involving Insight) but you would have to share more information to get a meaningful answer.

The best course of action would probably be to get R&D to provide a non-CAPTCHA protected way to enter the application during testing (and make sure this is not present in the production servers).

1 Completely Automated Public Turing test to tell Computers and Humans Apart

Upvotes: 3

mickey
mickey

Reputation: 190

if you are testing on an application for which you can also access the Database, you can take the generated CAPTCHA from the database and store it in a variable. Use the stored variable for printing CAPTCHA

Upvotes: 0

Related Questions