I am UI-testing a web page with a grid on it, using Selenium Webdriver in C#.
The grid has its own scroll bar and I would like to scroll down to the bottom of the grid to check a certain result has appeared when I add it through a modal form (the UI test is currently failing as it can't see the result until I scroll down).
How do I target the scroll bar on the grid as opposed to the normal scroll bar on the main webpage? This is the HTML of my grid's scroll bar:
<div class="ScrollbarLayout_face ScrollbarLayout_faceVertical public_Scrollbar_face" style="height: 367.38px; transform: translate3d(0px, 148.535px, 0px); backface-visibility: hidden;"></div>
WebElement element = driver.findElement(By.id("my-id"));
Actions actions = new Actions(driver);
First set focus to any object of grid by using any event
Then add below two lines:
Actions actions = new Actions(driver); actions.SendKeys(OpenQA.Selenium.Keys.End).Build().Perform();