2017-02-15 82 views
-4

我想将3个键盘按钮按在一起。通过使用硒的webdriver是它更多钞票如何使用硒webdriver按(ctl + alt + 6)

+0

http://stackoverflow.com/questions/11503736/key-press-in-ctrla-selenium-webdriver – RSon1234

+0

的可能的复制[密钥按在(按Ctrl + A)硒的webdriver](http://stackoverflow.com/questions/11503736/key-press-in-ctrla-selenium-webdriver) – sasquatch

回答

1
Actions a = new Actions(Driver) 
a.keyDown(Keys.CONTROL); 
a.keyDown(Keys.ALT); 
a.keyDown(Keys.NUMPAD6); 
a.keyUp(Keys.NUMPAD6); 
a.keyUp(Keys.ALT); 
a.keyUp(Keys.CONTROL); 
a.perform();