如何Selenium WebDriver在Java中使用自动化拖放功能?
3 回答
千巷猫影
TA贡献1829条经验 获得超7个赞
拖放可以像这样实现...
public ObjectPage filter(int lowerThreshold, int highThreshold) {
Actions action = new Actions(getWebDriver());
action.dragAndDropBy(findElement(".className .thumbMin"), lowerThreshold, 0).perform();
waitFor(elementIsNotDisplayed("#waiting_dialog"));
action.dragAndDropBy(findElement(".className .thumbMax"), highThreshold, 0).perform();
waitFor(elementIsNotDisplayed("#waiting_dialog"));
return this;
}
希望有帮助!
添加回答
举报
0/150
提交
取消
