I'm not a native english speaker, I'm sorry for my English. :)
I'm using Selenium Webdriver + Python. I have a custom scrollbar is on my page.
<div class="k-scrollbar k-scrollbar-vertical" style="width: 18px;"><div style="width:1px;height:1102px"></div></div>
<div style="width:1px;height:1102px"></div>
EV of this scrollbar has method "Scroll", code is:
function updateGridScrollInState() {
if (typeof window.GridProfile_Grid === 'object') {
window.GridProfile.ScrollY = window.GridProfile_Grid.data("kendoGrid").virtualScrollable.verticalScrollbar.scrollTop();
}
}
I can to manipulate with it, I know scrollbar's locator, but I can not understand how I could scroll to specific element into grid with javascript through driver.execute_script(some_script).
I need to move to element which is located outside of viewport: it is grid, grid has 33 rows, but only 22 rows is displayed, other 11 rows is displayed if I scroll down. I've tried to drag_and_drop this scrollbar:
ActionChains(driver).drag_and_drop(my_custom_scrollbar, list_of_grid_rows[30]).perform()
but I get Exeption:
selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (1015, 1242.699951171875) is out of bounds of viewport width (1920) and height (968)
I guess I can just drag_and_drop while list_of_grid_rows[index] is not displayed. But how can I get this result? Maybe I must to use value of height of scrollbar somehow?
Thank you an advance!