Select:針對 <select>
元素進行的操作
selectByIndex(index)
// 找到該 <select> 元素 we
WebElement we = driver.findElement(by, selector);
// 使用該元素,實例化一個 Select 類的對象 s
Select s = new Select(we);
s.selectByValue(value);
// 或者用index
s.selectByIndex(value)
鼠標事件,有關鼠標的操作,不只是單擊,有時候還要做右擊、雙擊、拖動等操作。這些操作包含在ActionChains類中。
原文轉自:http://gitbook.cn/books/58e54b57cfcd6fa52dcef1d2/index.html