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

How to assert not visible elements ?

5 Answers 212 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 19 Nov 2015, 08:12 AM

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

5 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 24 Nov 2015, 07:33 AM
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!
0
Andreas
Top achievements
Rank 1
answered on 24 Nov 2015, 09:42 AM

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

0
Accepted
Ivaylo
Telerik team
answered on 27 Nov 2015, 08:59 AM
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!
0
Andreas
Top achievements
Rank 1
answered on 30 Nov 2015, 09:32 AM

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

0
Ivaylo
Telerik team
answered on 30 Nov 2015, 04:19 PM
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!
Tags
General Discussions
Asked by
Andreas
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Andreas
Top achievements
Rank 1
Share this question
or