Quantcast
Channel: [Q&A - FAQ Neotys] Last questions
Viewing all articles
Browse latest Browse all 2283

Can't execute JS code with NLWebDriver on C#

$
0
0

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.


Viewing all articles
Browse latest Browse all 2283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>