Forum Discussion

Nikolayev's avatar
Nikolayev
Contributor
3 years ago

Using Tesseract-OCR in TestComplete

Hi SmartBear Community,   I Use Tesseract for OCR  texte recognition , It works very well with to generate the .TXT file.   When the .TXT file is created, I read it with this Python script :   ...
  • Nikolayev's avatar
    3 years ago

    It works, problem solved ! I have found with this method  :   

     

    sPath = "D:\\TESTOCR\\Text.txt"

    myFile = aqFile.OpenTextFile(sPath, aqFile.faRead, aqFile.ctANSI)

    lNum = myFile.LinesCount
    for i in range(0, lNum):

      curLine = myFile.Line + 1
      Log.Message("The " + str(curLine) + " line is:")

      Line = myFile.ReadLine()

      Log.Message(Line)