I have a bootstrap Angular dropdown, when you click on it, it makes the UL element visible whose overflow-y is set to auto, and therefore some of the elements inside are not visible, only after scrolling up or down.
I implemented a method of automatically scrolling to the selected element (the default behavior is to remember the last scroll position), so I would like to test it with Protractor.
I already tried the isDisplayed () method, turning it to true for all elements in this UL (although only 10 out of 20 are actually visible)
expect(item20.isDisplayed()).toBe(false); //returns true
After that I tried to click on them, expecting to throw an error "element is invisible", but they were all successfully pressed.
Any ideas on how to check if an element is in the visible part of this scroll?

source
share