moveToElement는 해당 Element의 top-left를 0,0으로 계산해서 이동시켜준다.
Actions operation = new Actions(driver);
WebElement vportIn = driver.findElement(By.id("vport-ns-in"));
WebElement vportOut = driver.findElement(By.id("vport-ns-out"));
int vportInWidth = vportIn.getSize().getWidth();
System.out.println("size of port-in : " + vportInWidth);
int vportInHeight = (vportIn.getSize().getHeight())/2;
System.out.println("size of port-in : " + vportInHeight);
int vportOutHeight = (vportIn.getSize().getHeight())/2;
System.out.println("size of port-out : " + vportOutHeight);
operation.moveToElement(vportIn,vportInWidth,vportInHeight).clickAndHold().moveToElement(vportOut,0,vportOutHeight).build().perform();;
'QA > Test Automation' 카테고리의 다른 글
Eclipse에서 Maven project git으로 올리는 방법 (0) | 2016.12.05 |
---|---|
org.openqa.selenium.SessionNotCreatedException: session not created exception (0) | 2016.12.05 |
Selendroid vs Appinum (0) | 2016.03.30 |
Monkey Talk (0) | 2016.03.30 |
Swapy-ob For UI Automation (0) | 2016.02.17 |
댓글