Ok, so I'm writing a Selenium script in C# so I can measure some load times and I need to scroll to the bottom of a page, so I'm using this piece of code "((IJavaScriptExecutor)driver).ExecuteScript("window.scrollTo(0, document.body.scrollHeight);");" but it return an error "System.InvalidCastException: 'Unable to cast object of type 'NeoLoadSelenium.neoload.wrapper.NLWebDriver' to type 'OpenQA.Selenium.IJavaScriptExecutor'.'". Does anyone have an idea how to fix this so I could scroll to the bottom of the page.
↧