This is a migrated thread and some comments may be shown as answers.

Wait for ExistsNot Failing with "Element Found"

5 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rebecca
Top achievements
Rank 1
Rebecca asked on 26 Nov 2013, 10:23 PM
I have an application with a dashboard that has a search filter.  After performing a search, a loading image (gif) appears until the search is complete and the dashboard is updated with the correct results.  I did not want the next step (opening a record) to execute until the loading image is gone because it would select from the previous dashboard records - so I added a "Wait for ExistsNot" step. I also couldn't add a timed "wait" step because the time it took to retrieve the search results varied too much.  However, with the "Wait for ExistsNot" step, it keeps failing with the message "Element was 'found'. Criteria: Element 'ExistsNot'.". I thought the whole point of this step was to wait until it was not found. What am I doing wrong?

Other settings: CheckInterval=50, ExistsNot=checked, IsWaitOnly=checked, SupportsWait=checked, Timeout=20000, UseStepWaitOnElements=checked.

5 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Top achievements
Rank 2
answered on 27 Nov 2013, 01:10 PM
Does the element still exist in the DOM?  Is it just hidden?  If it is just hidden after the results, it will always be found as it is in the DOM.

You can change to a "Wait for element 'whatever' 'is not' visible" if the element is hidden after results.
0
Rebecca
Top achievements
Rank 1
answered on 27 Nov 2013, 03:44 PM
That was it!  It still existed in the DOM and was just being hidden.  I changed it to "Wait for LoadingImage 'is not' visible" and the step now passes.  Thanks Daniel.

Also, I found that this video helped when trying to add a Wait (or verification) step for the Loading image when the image disappears before you can add a quick step: http://tv.telerik.com/watch/automated-testing-tools/using-dom-explorer-for-verifications-webui-test-studio
0
Shashi
Top achievements
Rank 1
answered on 27 Nov 2013, 07:10 PM
A word of caution though:  An element that is visible or hidden visually does not necessarily guarantee that it will be visible or hidden to the test. 

Wait/Verify Visible determines visibility of an element from one of its properties in the DOM (Visibility in case of Silverlight elements, I don't know the equivalents in HTML, WPF, etc).  Depending on the application implementation, the value of that property may not always correlate with what you see (or don't see) on screen.  So you may run into situations (as we have) where a Wait/Verify visible/not visible check will fail even though the element is visible or not visible (respectively).  You will then need to look for alternate ways to do what you need (that you were trying to do with the visibility check) or get the application developers to fix the issue with the property (assuming they have control over the setting of the property).

Hope that helps,
Shashi
0
Velin Koychev
Telerik team
answered on 29 Nov 2013, 01:03 PM
@ Shashi and Daniel - Thank you for sharing your experience and helping others. I have also updated your Telerik points.

@ Rebecca - Let me know if you need any additional assistance.

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Bhawna
Top achievements
Rank 1
answered on 14 Oct 2015, 09:59 AM

I am also having the same problem. I am putting verification for not visible.But its not working.

 

Please suggest some alternate for this problem.

Tags
General Discussions
Asked by
Rebecca
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 2
Rebecca
Top achievements
Rank 1
Shashi
Top achievements
Rank 1
Velin Koychev
Telerik team
Bhawna
Top achievements
Rank 1
Share this question
or