som*_*guy 10

工作代码 -

WebDriver driver = new InternetExplorerDriver();
driver.get("http://jqueryui.com/demos/slider/");
//Identify WebElement
WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/a"));

//Using Action Class
Actions move = new Actions(driver);
Action action = move.dragAndDropBy(slider, 30, 0).build();
action.perform();

driver.quit();
Run Code Online (Sandbox Code Playgroud)

来源 - https://gist.github.com/2497551


归档时间:

查看次数:

17831 次

最近记录:

13 年,2 月 前