首页 > 代码库 > webdriver 键盘模拟事件

webdriver 键盘模拟事件

ctrl + element

?
1
2
3
4
5
6
7
8
9
public void ctrl(String element){
 
    Actions action=new Actions(driver);
 
    driver.findElement(By.xpath(element)).click();
 
    action.sendKeys(Keys.CONTROL).perform();
 
}