Forum Discussion

vallabh_chitnis's avatar
vallabh_chitnis
Occasional Contributor
15 years ago

Does Test Complete Support reading Captcha image?

Hello,



We have a user registration form, wherein one of the fields is entering the captcha code visible on the screen. I am not sure whether test complete supports reading that captcha image. (Please refer attached screenshot)

Basically I want to read that image, have a variable that stores the read characters and input same characters in the field. This will save my manual intervention while registering the user.

I have tried with OCR object but unable to get any result.

Any suggestions?



Thanks.

Vallabh Chitnis

5 Replies

  • Hi Vallabh,


    Since CAPTCHA's goal is to ensure that the data is entered by a human, CAPTCHA is generated to avoid recognizing its text by any modern recognition tool. Besides that, the characters in the image you provided can hardly be recognized even by a human, so I don't think that you will be able to recognize the characters automatically.


    I recommend that you contact your developers and ask them to provide a workaround (for example, to make the web application print the expected code somewhere on the web page for debug purposes).


  • dvox's avatar
    dvox
    Occasional Contributor
    I have the same issue and requested the developers to add a hidden code for me to bypass the captcha code. But my problem is how do I send this information in the automation process. the html code is from that captha block. 



    <div>

    <input type="hidden" name="ctl00_RadScriptManager1_TSM" id="ctl00_RadScriptManager1_TSM" value="" />




    <input type="hidden" name="LBD_VCT_register_ctl00_contentplaceholder1_captcha1" id="LBD_VCT_register_ctl00_contentplaceholder1_captcha1" value="44cd6a446f6f4132903028e6467dec51" />




    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />




    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />




    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="SecretCode" />




    </div>




    any suggestion would be very encouraging.
  • Hi,



    You can access this web page elements if you use the DOM or Hybrid web tree model. As for the elements properties' values, you can try obtaining them from the value of the outerHTML property.
  • dvox's avatar
    dvox
    Occasional Contributor
    we are using the hybrid model. 



    on the page source, <input type="hidden" id="ctl00_ContentPlaceHolder1_TestScriptBypassCode" name="ctl00$ContentPlaceHolder1$TestScriptBypassCode">



    on the source code for this condition, it is written as follows.


     if (!TestScriptBypassCode.Value.Equals("$AUTO_SCRIPT$"))



    the pageobject is  iexplore.pageCreateAnAccountBoardmakerSha.formAspnetform.panelWrapper.panelMain.panelMainHolder.panelMainFrame.panelContent.panelContentBoxesWrapper.panelContentBoxTitle.panelFormSettingsDefault.panelForm.panelFormBlockFormBlock3.panelCtl00Contentplaceholder1Cap.textboxCtl00Contentplaceholder1C



    i used,



    function CaptchaValidation()


    {


        var iexplore;


        var page;


        iexplore = Aliases.iexplore;


        page = iexplore.pageCreateAnAccountBoardmakerSha;


        var obj = page.NativeWebObject.Find("value", "$AUTO_SCRIPT$", "INPUT");


        if (obj.Exists)        


        {


            Log.Message("Bypassed");


        }


    }


  • Hi Kanth,


    I've been informed that your task is being discussed within another support case, so let us continue working within it.