Wait for ExistsNot Failing with "Element Found"

6 posts, 1 answers
  1. Rebecca
    Rebecca avatar
    5 posts
    Member since:
    Jul 2011

    Posted 26 Nov 2013 Link to this post

    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.
  2. Answer
    Daniel avatar
    13 posts
    Member since:
    Aug 2013

    Posted 27 Nov 2013 Link to this post

    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.
  3. Rebecca
    Rebecca avatar
    5 posts
    Member since:
    Jul 2011

    Posted 27 Nov 2013 Link to this post

    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
  4. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 27 Nov 2013 Link to this post

    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,
  5. Velin Koychev
    Velin Koychev avatar
    88 posts

    Posted 29 Nov 2013 Link to this post

    @ 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.

    Velin Koychev
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  6. Bhawna
    Bhawna avatar
    1 posts
    Member since:
    Jul 2015

    Posted 14 Oct 2015 in reply to Daniel Link to this post

    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.

Back to Top