👨🏼💻개발/셀레니움
셀레니움 - C#, 자바스크립트 실행 결과 가져오기
Janger
2022. 10. 26. 15:02
728x90
// Number
var newScrollHeight = (long) js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight); return document.body.scrollHeight;");
// String
string title = (string)js.ExecuteScript("return document.title");
출처:
https://stackoverflow.com/questions/18572651/selenium-scroll-down-a-growing-page
Selenium - Scroll down a growing page
I'm using Selenium with c#. Selenium usually can automatically scroll down to the bottom of a web page to find elements but I having issues with a certain page which can increase in size. Can an...
stackoverflow.com
https://stackoverflow.com/questions/6229769/execute-javascript-using-selenium-webdriver-in-c-sharp
Execute JavaScript using Selenium WebDriver in C#
How is this achieved? Here it says the java version is: WebDriver driver; // Assigned elsewhere JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("return document.title"); But...
stackoverflow.com
728x90