0

How to scroll a webpage using selenium web driver in c #? Currently i am not able to scroll down a web page .I don't need to know how to scroll an element.

3
  • Can i show it in JAVA? Commented May 26, 2016 at 4:46
  • Hi Kishan, if its using javascript, it wont be useful because i am using selenium with c#. Commented May 26, 2016 at 4:53
  • File scrFile = (driver.getScreenshotAs(OutputType.FILE)); FileUtils.copyFile(scrFile, new File("d:\\Selenium\\screenshot2.png")); Use this lines and screenshot is ready. Commented May 26, 2016 at 4:59

1 Answer 1

2

What actually you can do is, you can check the element till where you want to scroll down and perform an action,

WebElement element = driver.findElement(By.id("youElementID"));
Actions act = new Actions(driver);
act.moveToElement(element);
act.perform();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.