Is there any way to create a virtual object?

Is there any way to create a virtual object?

Home Forums Ask Expert Is there any way to create a virtual object?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32073
    Kirill Bulatnikov
    Participant

      Hello hien.phan. Thanks for using ZAPTEST.

      For your task there is another solution. Simply create an object on the view and call it (for example) “TEXT”. It has “OCR Single” recognition type and you better switch it to “OCR Partial”.
      Than in the script code you can assign text value to this object using SetProperty method. And then use Exist method to check if this text presented on the screen. It will look like:
      [b][i]Application(“Application”).View(“View”).Object(“TEXT”).SetProperty “Text”,”Here is your text to validate”
      Application(“Application”).View(“View”).Object(“TEXT”).Exist[/i][/b]

      Hope that helps.

      Thanks.
      ZAPTEST Team.

      #32074
      hien phan
      Participant

        Thank you for your response. That means there is no ability to create an object via script. I have to create an object on VIEW first.
        That’s inconvenience if I want to capture a dynamic object on the many views 🙁

        #32075
        Kirill Bulatnikov
        Participant

          In fact you can use same object on many views, there is no actual difference (at least if the application is still the same). So try to use “TEXT” object validation on the several views. Simply set text property for the object to desired one.

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

        Virtual Expert

        ZAPTEST

        ZAPTEST Logo