How to Check that text does not display on a page

5 posts, 1 answers
  1. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 07 Dec 2015 Link to this post

    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

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 07 Dec 2015 Link to this post

    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!
  3. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 08 Dec 2015 in reply to Cody Link to this post

    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

  4. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 08 Dec 2015 in reply to Maria Link to this post

    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

  5. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 08 Dec 2015 Link to this post

    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!
Back to Top