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

How to Check that text does not display on a page

4 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maria
Top achievements
Rank 1
Maria asked on 07 Dec 2015, 04:53 PM

Hi there

I'm basically trying to delete an address from a customer account and make sure that after the deletion the text (title given to the address) does not display.

I've tried highlighting the element when it is visible and then selecting a check of 'is not visible' and moving the step to the correct place but it throws an exception of 'unable to locate element' when the test is run.

Any help would be great - I'm hoping I'm missing something really simple! 

Thanks

Maria

4 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 07 Dec 2015, 07:56 PM
Hi Maria,

You were actually on the right path by highlighting the element when it was visible and selecting a verification for is not visible. But instead of verifying is not visible you should select verify does not exist. The problem you're running into is that verify is visible or is not visible is looking at the visibility property of the element and needs the element to exist so it can verify the property. But in your case the element is actually removed from the browser's Dom, it no longer exists. So setting up a verify element does not exist is the correct way to verify the address has been deleted.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Maria
Top achievements
Rank 1
answered on 08 Dec 2015, 09:15 AM

Hi Cody 

Thanks for your reply but I don't seem to have the Verify - Exists/does not exist option.. only a Wait exists/does not exist option - please see attached.

Thanks

Maria

0
Maria
Top achievements
Rank 1
answered on 08 Dec 2015, 09:43 AM

I think i may have figured this out - I did a Wait - Does not exist and then right clicked on this in test studio and changed the role to a verification.

Can you confirm this is the right way to do it?

Thanks, Maria

0
Accepted
Cody
Telerik team
answered on 08 Dec 2015, 03:57 PM
Hello Maria,

Yes the approach you took of changing the role from wait for to verify should work just fine. In reality either the wait for or the verification would work just fine. The difference is that a verification will look once and only once and fail the test if it does not meet the condition specified. Versus a wait for will monitor the condition being tested and after a timeout period, the default being 30 seconds, will fail the test if the condition is not met after that timeout period. If the condition is met immediately though the test will immediately move on, it does not wait 30 seconds.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Maria
Top achievements
Rank 1
Answers by
Cody
Telerik team
Maria
Top achievements
Rank 1
Share this question
or