产生行动链
Actions链生成器实现了Builder模式,以创建包含一组其他操作的CompositeAction。这应该通过配置一个Actions链生成器实例并调用它的build()方法来获得复杂的动作,从而简化构建动作:
Actions builder = new Actions(driver);
Action dragAndDrop = builder.clickAndHold(someElement)
.movetoElement(otherElement)
.release(otherElement)
.build();
dragAndDrop.perform();