How catch text in transient pop-up?

How catch text in transient pop-up?

Home Forums Ask Expert How catch text in transient pop-up?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32469
    Sasha ZAP
    Moderator

      Hello Marco Malziotti,

      In order to capture a quick disappearing popup there is a need to prepare ZAPTEST to do 2 main things:
      1. Use only the most necessary methods, because each of the method require some processing time.
      2. To create an object that ZAPTEST will manage to locate it as quickly as possible.
      To follow these instructions you need to:
      1. Use only the Exist method and only for the Text based object.
      2. Before running the test make sure the Text object can be located in the ZAPTEST GUIMap (Use the “Calculate and show the OCR precision” icon to do so, the icon with the target image).

      Please note the following:
      If an object contains a text in it, it is best to use a Text based object (And not an image based object);
      Image based object depends on the coordinates where it is located, this means, for example, if you’ll run same test in a different screen’s resolution rate an image object may not be found – Therefore in such case there is a need to use the “Relative Object” Property or to set it in an Area object.
      More on images please check our tutorial on this at:

      Image and Area Objects


      Regarding Relative Objects you can find explanation on it at:
      https://www.zaptest.com/tutorial/login  
      Also you can find more tutorials at:

      Tutorial

      Thanks,
      ZAPTEST Team 

      #32471
      Marco Malziotti
      Participant

        Thanks
        I have:
        – use “Calculate and Show OCR precision” for txtMessage and
        – modify script as following (see new attachment):
        If (Application(“Application”).View(“Message”).Object(“txtMesasge”).Exist) then
        text = Application(“Application”).View(“Message”).Object(“txtMesasge”).GetText
        Datatable.SetValue “resultMessage”,Trim(text)
        else
        Datatable.SetValue “resultMessage”,”Error: pop-up not found”
        end if
        but at runtime, even if the “then” branch is executed, text variable is set to “” (empty string).
        Other technical details:
        – ZapTest version 19.6.14 (free version)
        – PC: Lenovo T430
        – CPU: Intel Core i5 2.6 GHz
        – RAM 4 GB

        Attachments:
        #32473
        Sasha ZAP
        Moderator

          Hello Marco Malziotti,
          1. Before running the test make sure the Text object can be located in the ZAPTEST GUIMap (Use the “Calculate and show the OCR precision” icon to do so, the icon with the target image).
          2. There is no need to use the GetText method only the Exist method, because the popup disappears very quickly there is no time to process another method ( In the final test report you will be able to see if the Exist method captured the currect text.
          Thanks,
          ZAPTEST Team

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

        Virtual Expert

        ZAPTEST

        ZAPTEST Logo