Forum Discussion

rodrigueA's avatar
rodrigueA
Occasional Contributor
8 years ago

Keyword test - How check If image exist

Hello,

For test a smartphone application, I want find an Image between other images and touch this.
I've defined in Test Complete the image I would found.
If this Image is visible at the screen t the beginning of the test, all works correctly.
But if image is not visible (slide needed) , It doesn't work.

 

I want to make a test like this (using keymord, I'm not very comfortable wth scripting) :

 

Label :
   If Image exists
     Touch Image
   Else
      bottom slide
       Goto label
    End if

But in condition of "IF...THEN" fnction, I can't find a test about visibility of an Image.

I tried also While loop , but i can't find a test about visibility of an image.

 

  • You can add any keyword test or script or on-screen action inside an If-Then.   How would you do the test if you weren't using the If-Then?

    • rodrigueA's avatar
      rodrigueA
      Occasional Contributor

      Thanks for your answer, but in Keyword test mode, when I choose "IF...THEN" , for condition I view only possibility to check relation between 2 values.

      I can't find how check if an object is visible on the screen :

       

      • Marsha_R's avatar
        Marsha_R
        Moderator

        See attached screenshots.  You just have to pick the values properly.