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

How to verify that an item does NOT exist

10 Answers 191 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 12 Apr 2011, 02:57 PM
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?

10 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 14 Apr 2011, 04:36 PM
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
0
Jeff
Top achievements
Rank 1
answered on 18 Apr 2011, 04:23 PM
I watched the video.  That's a pretty simple solution.  Thanks for your help!
0
Abhilash
Top achievements
Rank 1
answered on 04 Apr 2012, 06:11 AM
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
0
Abhilash
Top achievements
Rank 1
answered on 04 Apr 2012, 06:47 AM
0
Dennis
Top achievements
Rank 1
answered on 23 Apr 2015, 09:09 PM

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

0
Ivaylo
Telerik team
answered on 24 Apr 2015, 05:30 AM
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
 
0
siddhartha
Top achievements
Rank 1
answered on 17 Sep 2018, 04:42 PM
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.
0
Daniel
Top achievements
Rank 1
answered on 25 Sep 2018, 07:17 AM

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

0
Daniel Djambov
Telerik team
answered on 25 Sep 2018, 07:21 AM
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
 
0
Dobry Zranchev
Telerik team
answered on 25 Sep 2018, 07:25 AM
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
 
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Jeff
Top achievements
Rank 1
Abhilash
Top achievements
Rank 1
Dennis
Top achievements
Rank 1
Ivaylo
Telerik team
siddhartha
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Daniel Djambov
Telerik team
Dobry Zranchev
Telerik team
Share this question
or