2014-12-11 1 views
1

안녕하세요. 크롬 브라우저가 설치된이 웹 드라이브 프로그램을 작성 중입니다. 이 드래그 앤 드롭 기능을 제외한 모든 기능이 정상적으로 작동합니다.크롬에서 드래그 앤 드롭을 실행하지 않습니다.

오류가 발생하지 않지만 여전히 조치를 실행하지 않습니다. 이걸로 나를 도울 수 있니? 감사합니다

WebElement name = driver.findElement(By.xpath("xpath id")); 
    WebElement target = driver.findElement(By.xpath("xpath id")); 
    Actions builder = new Actions(driver); 
    Action dragAndDrop = builder.clickAndHold(name) 
    .moveToElement(target) 
    .release(target) 
    .build(); 
    dragAndDrop.perform(); 

}

+0

HTML5 드래그 앤 드롭 인 경우 ** 액션 ** 클래스를 사용하여 직접 처리 할 수 ​​없습니다. ** Jquery **를 사용해야 할 수도 있습니다. 다음 링크를 살펴보십시오. [http://stackoverflow.com/questions/24742539/unable-to-perform-html5-drag-and-drop-using-javascript-for-selenium-webdriver-te](http : //stackoverflow.com/questions/24742539/unable-to-perform-html5-drag-and-drop-using-javascript-for-selenium-webdriver-te), [ISSUE LINK 1] (https://code.google .com/p/selenium/issues/detail? id = 6315), [문제 링크 2] (https://code.google.com/p/selenium/issues/detail?id=3604) – Subh

답변

관련 문제