user2758235
user2758235

Reputation: 1

How to scroll down with Selenium WebDriver using C#?

I'm making an automated updater on a google docs and i've been stuck for many hours trying to figure out how to trigger a scroll down on the spreadsheet,

i've also tried other solutions posted here right now i'm trying to trigger it through javascript, weird thing is that it works on other website but for the google docs spreadsheet it's not working

here is my code on scrolling down:

js.ExecuteScript("window.scrollTo(0,Math.max(document.documentElement.scrollHeight," +
                    "document.body.scrollHeight,document.documentElement.clientHeight));");

I need help if there's any other solution thanks in advance

Upvotes: 0

Views: 1091

Answers (1)

Robbie Wareham
Robbie Wareham

Reputation: 3428

While I am a massive fan of selenium, is it really the best tool for updating a Google Docs spreadsheet?

Unless I was working for Google, and I would not try and automate this application.

However, there is an API provided by Google specifically to access spreadsheets;

https://developers.google.com/google-apps/spreadsheets/

Going via the API will be far faster and reliable.

Upvotes: 2

Related Questions