Scrolling until object is visible up/down and left/right

I am workig with Ag-Grid and have gor data drivimg working with the grid

However columns and rows not shown on screen are invisible until the are scrolled to.
Any idea how to do this?
in c# I would use a try catch and scroll on the exception until the value is visible which is a bit crude. This is easy scrolling vertically as I can use the home key to scroll to the top first. But for horizontal scrolling how would i scroll to the far left or right to set the starting point.

obviously if there is a more elegant solution i would prefer that.

Hi @louis.oliver

This probably won’t work, but did u try:

1 Like

You can try and use javascript to Scroll into view

WebElement element = WebUI.executeJavaScript("return document.getElementById('someId');", null)


but when there not shown you might not have another choice as to scoll and check.

Hi @louis.oliver ,

I am also facing the issue while scrolling horizontally in ag-grid table. Did u get any solution for it ? Kindly please guide me.

Thanks in advance.