lundi 13 février 2017

Drag And Drop in selenium by java

Vote count: 0

I want to drag and drop,but by my code it only perform drag not drop operation,so give a way to perform drop opration also

driver.get("http://ift.tt/2kJWOKy");

            WebElement from = driver.findElement(By.xpath("//*[@id='qinfo']/tbody/tr[1]/td[2]/p/b"));
            Actions builder = new Actions(driver);
            builder.doubleClick(from).perform();
            Thread.sleep(1000);

            WebElement to = driver.findElement(By.name("q"));
            Action dragAndDrop = builder.clickAndHold(from).moveToElement(to).release(to).build();
            dragAndDrop.perform();

asked 10 secs ago

Let's block ads! (Why?)



Drag And Drop in selenium by java

Aucun commentaire:

Enregistrer un commentaire