recognizeCaptchaCB

Gets the text of the specified captcha, recognized with service CaptchaBot.

Syntax

recognizeCaptchaCB = function(aImageElement, aKey, aPhrase, aMinLen,
  aMaxLen, aNumeric, aRegSense, aCalc, aRussian);
 
recognizeCaptchaCB = function(aImage, aKey, aPhrase, aMinLen,
  aMaxLen, aNumeric, aRegSense, aCalc, aRussian);

Parameters

  • aImage
    • functions: element image of which has to be recognized
  • aImage
    • functions: image to be recognized
  • aKey
    • functions: API key of CaptchaBot service
  • aCaptchaID
    • functions: resulting captcha ID
  • aPhrase
    • functions: 0 = one word, 1 = captcha has two words
  • aMinLen
    • functions: 0 = default value, >0 = minimum length of text displayed in a CAPTCHA, the employee must enter
  • aMaxLen
    • functions: 0 = unlimited, >0 = maximum length of text displayed in a CAPTCHA, the employee must enter
  • aNumeric
    • functions: 0 = default value, 1 = captcha consists only of digits, 2 = captcha has no digits
  • aRegSense
    • functions: 0 = register has no values, 1 = register has a value
  • aCalc
    • functions: 0 = default value, 1 = mathematical operation of digits displayed in a captcha
  • aRussian
    • functions: 0 = default value, 1 = show captcha to employee with knowledge of Russian language

Returned value

  • functions: text obtained by recognition

Notes

  • If the service CaptchaBot returns an error, the result of the function is an empty string

Examples

  1. loadURI('http://www.google.com/recaptcha/learnmore');
    //Get the captcha image
    var image = getElement('img',0,['src'],['google.com/recaptcha/']);
    //Send the image to recognize with service CaptchaBot
    var captchatext = recognizeCaptchaCB(image,'MyCBKey').text;
    //If the text is not empty, then enter the text to the input field
    if (captchatext !== ''){
      var input = getElement('input',0,['name','id'],['recaptcha_response_field','recaptcha_response_field'],true);
      clickElement(input);
      typeIn(captchatext);
    }
  2. loadURI('http://www.google.com/recaptcha/learnmore');
    //Get the captcha image
    var image = getImage(0,['src'],['google.com/recaptcha/']);
    //Send the image to recognize with service CaptchaBot
    var captchatext = recognizeCaptchaAG(image,'MyCBKey').text;
    //If the text is not empty, then enter the text to the input field
    if (captchatext !== ''){
      var input = getElement('input',0,['name','id'],['recaptcha_response_field','recaptcha_response_field'],true);
      clickElement(input);
      typeIn(captchatext);
    }