progress bar appears and disappear very fast

Ask general questions here.
Bianca
Posts: 1
Joined: Thu Feb 04, 2016 4:04 pm

progress bar appears and disappear very fast

Post by Bianca » Thu Feb 04, 2016 4:15 pm

Hi,
I have a problem with a element (a progress bar element) which appears and disappear if i do some action. What i have to do is to check if that progress bar appears and disapear if i do an action, and with Ranorex i have to validate if exist. But, if i use the method Validate.Exist(repoItem), the test fails because it didn't find the element because the element dissapear very fast. What else should i use in order to check if that element appears.I also try to decrease the search time out of that element but with no luck.

Thanks,
Bianca

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: progress bar appears and disappear very fast

Post by krstcs » Fri Feb 05, 2016 3:15 pm

First, welcome to the forums!


So, about your issue:

1. Changing the timeout of an element does not make Ranorex FIND the element any faster, it only makes Ranorex FAIL to find the element faster. Ranorex takes a certain amount of time to find elements, which is dependent upon many things, not the least of which is the XPath used.

2. As I said, Ranorex will take some time to find ANY element, so if the element appears and disappears very quickly, Ranorex will not have enough time to find the element before it is gone. This is going to be the case for ANY Functional UI automation tool, not just Ranorex. The tools have to have time to search for the elements.


If the element disappears that quickly, then there is no way you are going to be able to use Ranorex to validate that it exists. And I don't think you should. Think about what you are actually testing. If you are testing that the popup exists, then you need to make sure the developers and your leadership understand that the popup has to slow down if they want you to validate it. You really shouldn't be testing for something that happens that quickly using a functional UI automation tool anyway.

My suggestion would be to only use WaitFor.NotExist on it to make sure it goes away within a certain time, but NOT to try to validate that it exists.
Shortcuts usually aren't...