Highlighted
New Member.
118 views

If condition pass, but not execute the code

Hi everyone,

I'm facing a problem on my GUI test. I want to check if a certain screen of a application is loaded or not, for this I'm using a bitmap checkpoint and a text area checkpoint. I'm using both because sometimes bitmap checkpoint is so sensible and fail for a little change is the image, so to I decide to use test area for this. Alright, so my problem is that:

I'm using a infinity loop with a counter timer. If the time pass than a X seconds, so exit the loop and report. If not check the checkpoints, if one pass exist the loop and report. When I run this script the code simple not exit the ininity loop, but if I go and see the Results View it tells me that the second checkpoint is passed! So, the condition on the If passed, but not execute the code? Why? 

Another strange thing is that I used the same code in another action and works! The only difference is that another action I'm using more checkpoints. So I really not undestandiing what is happening. If you guys can explain for me. 

Thanks and Regards. 

 

 

 

0 Likes
2 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: If condition pass, but not execute the code

Post your code so we have a better idea.

Mark Smith.

0 Likes
Highlighted
New Member.

Re: If condition pass, but not execute the code

Post your code so we have a better idea.

Oh, I attached a image of my code and the run view results 

Thanks for help

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.