Wednesday 16 January 2013

How to drag and drop the control using selenium Webdriver

How to drag and drop the control using selenium Webdriver?

Use the following Code:

WebElement draggable = driver.findElement(By.xpath("//*[@id='lblpgmlist']"));
WebElement to = driver.findElement(By.xpath("//*[@id='calendar']/div/div/table/tbody/tr[2]/td[2]"));
new Actions(driver).dragAndDrop(draggable,to).build().perform();


No comments:

Post a Comment