Watch this video to learn how to handle floating elements on a web page, e.g. a top menu or a cookie consent that will stay in the viewport when the page is scrolled. We have used this test case in the demonstration.
It can sometimes be hard to determine whether an element on a web page is actually shown in the current viewport or not. Using the Position property on the Find Web Element we show how you can tell if the top menu is both visible and inside the viewport after the page has been scrolled.
In order to scroll the page we show the “Scroll into view” feature that tells the Find Web Element building block to scroll the page until the captured element – in this case a paragraph of text – is in the viewport.
Download sample: floating_menu
Back to videos