Share
Go down
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

How to get text from captcha image.

on Fri Aug 21, 2009 3:32 pm
Some sites used captcha images to get registration process done. How can we type that text from selenium?
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: How to get text from captcha image.

on Fri Aug 21, 2009 3:40 pm
Hi,

The main motive of captcha image is to free from spam message. It 's main idea is to generate the unquie character from same URL.

You can't get text of image even from programming also. It is type only through manually, there is no other options availiable.

The possible things you can do from it are as follows:

1. Verify the image is present or not by its name or id.
2. Verify href/Url of that image.

I hope you will get an idea about this "captcha" object. Best Of Luck.

Bye
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: How to get text from captcha image.

on Tue Sep 15, 2009 10:58 am
hi,

to get URL of the captcha image , use the following command


  • [info] Executing: |storeAttribute | locator/IdOfCaptcha@src | variable|
  • [info] Executing: |type | locator| ${variable} |
bye
sillybrian
Posts : 1
Join date : 2009-09-15

Re: How to get text from captcha image.

on Tue Sep 15, 2009 12:16 pm
The problem that i have is when I do a get_attribute it errors telling me Could not find element attribute:....

I would think I need to read the attribute of //img

I am working with ruby to use selenium. Here is what the inspect shows on the elements.











avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: How to get text from captcha image.

on Tue Sep 15, 2009 12:20 pm
Hi,

I think the problem is regarding synchronizing, the image is still loading and you try to fetch its attribute. If this is condition, wait for page to load fully.

If not, The above error message will show you how to cilcon refresh link which made image to load again. try to click on that link or refesh page, then you fetch its attribute.

Then also the image is not appearing, then may be some problem with your image.

try this and let me know. Best of luck.

bye
Sponsored content

Re: How to get text from captcha image.

Back to top
Permissions in this forum:
You cannot reply to topics in this forum