Micro Focus QTP (UFT) Forums
Can we automate CAPTCHAS through QTP? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Can we automate CAPTCHAS through QTP? (/Thread-Can-we-automate-CAPTCHAS-through-QTP)



Can we automate CAPTCHAS through QTP? - venkatesh - 10-15-2008

Hi Ankur, This is Venkat. I’m regular visitor of your blog. I’ve a query. While browsing on human validation I found Captcha image value in the view source of the page. Can we automate this one using QTP?


RE: Human Validation - Ankur - 10-15-2008

One word answer- NO

Some points to support it:

  1. CAPTCHAS were primarily designed to prevent automated logins into the system.
  2. CAPTCHA values changes on every refresh of the page, so though you might find some hint of it in source you might not get the same value on script-run

In one condition, you might validate it, if you know all CAPTCHAS values present in the system. that ways you can store the values with the corresponding image in an array and check the image. If image match, use THAT value. This is not a perfect solution though, I would not recommend automating CAPTCHAS using QTP.


RE: Human Validation - venkatesh - 10-15-2008

Ankur,
I agree with you. Values changes on every refresh of the page. I did some thing to capture the values in CAPCHAS.
Step1: Go through the http://displaybanner.com/ and navigate to user registration page.
Step2: Record the script for one user creation, when coming to human validation record please fallow the below steps:
* Navigate to page source under the view menu, find the human validation values and copy it and place it in the web text box.
* Stop recording.

When i run the same script in the view source page its showing another values.

So Can not we capture the values for every refresh of the page? Even if we do not know the values.

If i am wrong please correct me.

Thanks in Advance.
Venkatesh. g
*


RE: Human Validation - Ankur - 10-15-2008

That is a one off case and I would say it's a case of poor design where the developers have exposed the CAPTCHA's value.
Try doing the same thing here... http://mail.google.com/mail/signup, you will not find anything(or perhaps some encoding) in source except the link to CAPTCHA image.

As for your question-- it is possible for the specific case shown given by you because the values are populated in innerHTML and innertext run time properties.


RE: Human Validation - venkatesh - 10-15-2008

Yes, for Gamil and yahoo we can not find the values of CAPTCHAS in view source page.

Thanks,
Veanktesh. g


RE: Human Validation - Kishor140465 - 10-29-2008

Hi Venkatesh,
We can try below(Descriptive Programing) to get CAPTCHA.

Code:
Browser("Display Banner - Diversify").Page("Display Banner - Diversify").Image("Register - Custom Animated").Click
k=Browser("Display Banner - Diversify").Page("Display Banner - Diversify_2").WebElement("html tag:=FONT").GetROProperty("innertext")
msgbox k
Browser("Display Banner - Diversify").Page("Display Banner - Diversify_2").WebEdit("tcode").Set k



RE: Can we automate CAPTCHAS through QTP? - hieutue - 12-08-2008

Hi, about this action, I can propose the method of Motevich's:
+save the capcha image
+use OCR soft to recognize it
+run
It only work with the clearly capcha.^-^;others case we cannot(such as the capcha of rapidshare several months ago)

Please note it no good for trying to attach or destroy some website by this way!


RE: Human Validation - biraj_sahu - 03-30-2009

Hi, I am new to this forum...
Please let me know, if we have any workaround for this captcha automation?? If so, please explain or refer to where we can get substantial info


RE: Can we automate CAPTCHAS through QTP? - rahul1234 - 11-09-2009

Hi Ankur,
i have one querry regarding script.
I was trying to parametrize the value from datatable, i wrote like this

Code:
Dim AgentName
AgentName=Datatable.value("AgentName")
Dialog("Login").Winedit("AgentName:").Set datatable("Agent",dtClobalsheet)
When i run the script it was picking the value from datatable and result window was also displaying the value which was taken from the datatable, while it should display some error. Because i wrote dtClobalsheet rather then dtGlobalsheet.
Even i did not wrote Option Explicit.
Can you let me know why it happened?


RE: Can we automate CAPTCHAS through QTP? - Saket - 11-10-2009

Hi rahul1234,

your query is not at all related to the original topic of thread.
always make sure your are posting under a thread which is relevant to your query or you are answering the thread query.
Please dont divert a thread with your new query.

You will need to create a new thread for the query.

as the original query has been answered, Thread is locked now.