## 鼠標鍵盤模擬
### 單一操作
```
//新建一個action
Actions action=new Actions(driver);
//操作
WebElement element = dr.findElement(By.id("test"));
WebElement element1 = dr.findElement(By.id("su"));
action.sendKeys(element,"test").perform();
action.moveToElement(element1);
action.click().perform();
```
### 組合操作
```
(new Actions(dr)).dragAndDrop(dr.findElement(By.id(item)), target).perform();
Action dragAndDrop = builder.clickAndHold(someElement)
.moveToElement(otherElement)
.release(otherElement)
.build().perform();
```
其他鼠標或鍵盤操作方法可以具體看一下API里面的`org.openqa.selenium.interactions.Actions`類。