How to verify that an item does NOT exist

11 posts, 0 answers
  1. Jeff
    Jeff avatar
    1 posts
    Member since:
    Oct 2012

    Posted 12 Apr 2011 Link to this post

    The objective of the test I am trying to write is to verify that when a specific value is selected from a drop-down menu that a 2nd-drop down box will not longer exist on the screen.  For example, by default when the page loads there are 2 drop-down boxes available.  If I select value #3 from the first drop-down box the 2nd drop-down should disappear.  How can I write this verification?
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 14 Apr 2011 Link to this post

    Hello Jeff,

    One key question to answer that affects how to accomplish this, is the 2nd drop down simply hidden or is it actually removed from the DOM (i.e. the HTML driving the page). Assuming it's simply hidden there are a few different ways to do this. You can verify whether the element is not visible or disabled.

    Please watch this video demonstrating how to use the DOM explorer to locate an element that is not visible on screen to perform a verification on it. It may be easier for you to create the "element is not visible" verification first, while it is still visible, and then drag the Verify step after the step that hides it. This way prevents hunting through the DOM.

    To verify if an element is disabled, please read this KB article.

    Regards,
    Anthony
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Jeff
    Jeff avatar
    1 posts
    Member since:
    Oct 2012

    Posted 18 Apr 2011 Link to this post

    I watched the video.  That's a pretty simple solution.  Thanks for your help!
  4. Abhilash
    Abhilash avatar
    3 posts
    Member since:
    Jan 2012

    Posted 04 Apr 2012 Link to this post

    Hi Anthony,

    I have a situation where a UI object is removed from the DOM and I need to verify that it does not exist. How do I go about it?

    Regards,
    Abhilash
  5. Abhilash
    Abhilash avatar
    3 posts
    Member since:
    Jan 2012

    Posted 04 Apr 2012 Link to this post

  6. Dennis
    Dennis avatar
    24 posts
    Member since:
    May 2014

    Posted 23 Apr 2015 Link to this post

    Is there current documentation relevant to this forum post? Both the KB article and the documentation link are dead.

    KB article: http://www.telerik.com/automated-testing-tools/support/kb/how-to-verify-the-disabled-attribute.aspx

    Documentation: http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/if-else-logical-step-fails.aspx

  7. Ivaylo
    Admin
    Ivaylo avatar
    779 posts

    Posted 24 Apr 2015 Link to this post

    Hello Dennis,

    The first article should be available soon under this URL. The second article you can find here.

    Thanks for your patience and please excuse us for the inconvenience caused.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  8. siddhartha
    siddhartha avatar
    1 posts
    Member since:
    May 2018

    Posted 17 Sep Link to this post

    I want to confirm that a specific web element(which is removed from product list) should not be displayed on web page as this is the verification point that removed product should no more be displayed on product listing web page, applying verification as verify element is not visible fails showing error unable to locate element, how to handle such condition with Telerik Test Studio.
  9. Daniel
    Daniel avatar
    2 posts
    Member since:
    Jan 2011

    Posted 25 Sep in reply to siddhartha Link to this post

    There is functionality in Test Studio for such cases, which is called WaitForExistsNo or VerifyExistsNot, which validates for certain timeout that element is not found on the page.

    Please check this article to see how to use it: https://docs.telerik.com/teststudio/knowledge-base/verification-kb/verify-deleted-data

    Hope this helps

  10. Daniel Djambov
    Admin
    Daniel Djambov avatar
    74 posts

    Posted 25 Sep Link to this post

    Hi,

    Please let us know how the bellow suggestion worked in your case.

    Best Regards,
    Daniel Djambov
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  11. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    353 posts

    Posted 25 Sep Link to this post

    Hello,

    Thanks for the question.

    There is difference between not visible and not exist. In your case you have to change the verification to not exist. The reason is that if you have not visible out framework is waiting to find the element.
    If you use not exist you will verify that the element is not there. 

    Do not hesitate to write back for further questions.

    Regards,
    Dobry Zranchev
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top