I have a project I'm working on that writes to a google sheet using their API, but to be useful the user would like to see the google sheet and the cells the API writes to, so Im using selenium to open a window to the sheet and scroll down to keep up with the cell the API writes to
Ive come across code that looks like driver.execute_script("window.scrollBy(0,250);", "") but that doesnt seem to work on the google sheets page, no error, just doesnt do anything.
Ive also found the body element driver.find_element(By.XPATH, "//Body[@dir='ltr']") and the scroll bar element driver.find_elements(By.CLASS_NAME , "native-scrollbar") of the page but I cant find anything useful to do with these, though I feel there may be a workaround using one of these.
my ideal output would be the ability to scroll down by a set amount of pixels, or to a specified cell inside a google sheets page using a selenium chromewebdriver
ps. I have the Javascript tag because I have the option to run JS commands straight to the console using `driver.execute_script()'