Interview Questions

SELENIUM REAL TIME INTERVIEW QUESTIONS - How to scroll web element?--not browser—

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

SELENIUM REAL TIME INTERVIEW QUESTIONS - How to scroll web element?--not browser—

FirefoxProfile profile=new FirefoxProfile();
profile.setEnableNativeEvents(true);
WebDriver driver=new FirefoxDriver(profile);
driver.navigate("http://jqueryui.com/draggable/");
Thread.sleep(6000L);
WebElement element=driver.findElement(By.xpath("//div[@id='draggable']"));
Actions actn=new Actions(driver);
actn.dragAndDropBy(element, 50, 50).build().perform();
}

(Continued on next question...)

Other Interview Questions