How to assert not visible elements ?

6 posts, 1 answers
  1. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 19 Nov 2015 Link to this post

    Hi,

     I have troubles to understand how to use the "not visible" assertion during recording.

     My scenario is a table where I can hide/show columns. When I now hide a column, how shall the assertion work that the column is not visible. I dont have any element on my screen that I can mark and the select "not visible".

     So how do I test non-visible elements in a recording ?

     Thanks

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 24 Nov 2015 Link to this post

    Hello Andreas,

    You have two options:

    1. You should not hide the column and add the verification you would like when the element is present.
    2. If the element is not visible by default you can locate it using the DOM and add the assertion. 

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 24 Nov 2015 in reply to Ivaylo Link to this post

    Hi Ivaylo,

     thanks for your answer. I'm not sure though this will help. 

    1) This does not help to ensure that hiding something really does its job. I want to assert that clicking a button hides something.

    2) This will not work for people creating tests that are not close to coding. The idea behind recording tests is that Domain experts can create the tests. They are normally not people close to coding, so navigating through the DOM is not feasible.

     It might be simply that this is not doable as I expected to be.

    But thank you for your answer

  4. Answer
    Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 27 Nov 2015 Link to this post

    Hello Andreas,

    Unfortunately there are the two possible options on how to proceed.

    Thank you for your understanding.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 30 Nov 2015 in reply to Ivaylo Link to this post

    Hi,

     I think I might got the understanding now how to test this.

    - During recording verify the element that it is visible

    - Hide the element

    - Copy the verification (in the IDE) and change it then to "not existing" or "invisible"

     This might do the trick.

     Thanks for the time and effort :)

     Andreas

  6. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 30 Nov 2015 Link to this post

    Hello Andreas,

    You are most welcome.

    I am closing this case as resolved.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top