Forum Discussion

sanjayram's avatar
3 months ago

Need code expression for click right (CLICKR)


        While using OCR action for test script, i can't able to perform clickR operation in testcomplete because i need to clickR below the recognized text, Need Need code expression for click right (CLICKR) ? 


1 Reply

  • HI Sanjayram,

                           U can click two ways.

    1 ocr.Recognize("Your object").BlockByText(m_BlockTxt, m_Position).ClickR


    OCR.RecognizeText("Image", "English", OCRSpeed.Fast);
    let ocrResult = OCR.GetRecognizedText("Image");
    let recognizedText = ocrResult.Text;
    let textPosition = ocrResult.Position;
    let xOffset = 10;
    let yOffset = 10;

    let mousePositionX = textPosition.X + xOffset;
    let mousePositionY = textPosition.Y + textPosition.Height + yOffset;
    aqObject.MouseClick(mousePositionX, mousePositionY, MouseButton.RightButton);


    u can change the posotion xOffset = 20,30,40.....etc