fbpx

Get text from applicaiton

Get text from applicaiton

Home Forums Ask Expert Get text from applicaiton

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32013
    Akos Kovacs
    Participant

      There is an application, which can analyze files and show output inside application. It is simple text, it can be highlighted and copied from application. Text is recognized only partly in a given view. It recognizes a few characters, words, but not whole sentences. How could I get text from a given view? Why could’t recognize all the textual information.

      #32019
      Sasha ZAP
      Moderator

        Hello plaidshirtakos,

        In order to enable ZAPTEST to recognize more then a single string you need to scan the View as a Block or as a Multiline – Such scans will create text based objects which may contain even a whole text paragraph:
        To execute such scans you need to click the little right arrow-down button, next to the “Scan GUI” button;
        Another option to enable such objects is by creating a Multiple or a Block Object type (Again, next to the “Create new object”, click the small arrow to choose such option), then you can set the object to contain more then a single string (Also you can do it in the “Recognition type” Property in every object which already was saved in the Repository).

        Once you’ve set an object as a BlockMultiline you can then use methods such as “GetText” to retrieve the whole block data;
        Also you can use methods such as “RightBlock” (Or any other direction) with a combination of all available methods to retrieve data which is next to the block, for example:
        MsgBox Application(“Application”).View(“View”).Object(“Object”).RightBlock.GetText

        Hope this will help.

        Thanks,
        ZAPTEST Team

        #32027
        Akos Kovacs
        Participant

          Thanks, it is working, it scans all of the text areas. But it is unable in some cases to get text. As I see it can’t handle dotted characters and filenames with extensions.

          #32034
          Sasha ZAP
          Moderator

            Hello plaidshirtakos,

            When you create a new object ZAPTEST sets its type to an “OCR (Single)” type, change the object’s “Recognition Type” Property into Image and try again.

            Thanks,
            ZAPTEST Team

            #32036
            Akos Kovacs
            Participant

              I see, but it seems recognized, I see text correctly under object properties in Text named field. I get wrong value when I use GetText method.

              #32037
              Sasha ZAP
              Moderator

                Hello plaidshirtakos,

                The Object’s Properties are being set during the GUI scan, when you want to run the test the Object gets to its runtime phase which then ZAPTEST tries to find the Object in the AUT (Application Under Test):
                If the Properties are even a bit different during runtime then they are during the scan GUI phase the Object will not recognized properly which will cause methods such as GetText to return a wrong data.

                Please check this tutorial how to create your first testing script with a few object’s recognition features:

                Building Your First Script

                For more information you can check our Beginner Tutorial at:

                Tutorial

                Also please check our extensive videos’ documentation for more explanations:
                https://www.zaptest.com/user-zone/product-training

                P.S. If the above will not help, please attach your test script (The *.zap file) and a screenshot of the whole page you are trying to get text from it (Please note what text are you trying to get).

                Thanks,
                ZAPTEST Team

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.

              Virtual Expert

              ZAPTEST

              ZAPTEST Logo