List of usage examples for org.openqa.selenium.interactions Actions keyUp
public Actions keyUp(CharSequence key)
From source file:org.safs.selenium.webdriver.lib.WDLibrary.java
License:Open Source License
/** * Release a Key by Selenium's Actions API. Release the key pressed by {@link #keyDown(Keys)}. * @param keycode Keys, keycode to release (e.g. <code>Keys.CONTROL</code>) * @throws SeleniumPlusException if fail * @see #keyDown(Keys)/*from w w w . j av a 2s.c om*/ */ public static void keyUp(Keys keycode) throws SeleniumPlusException { try { WebDriver wd = (WebDriver) getWebDriver(); Actions actions = new Actions(wd); actions.keyUp(keycode); actions.build().perform(); } catch (Exception e) { throw new SeleniumPlusException("Unable to successfully complete Selenium keyUp for key '" + keycode + "' due to " + e.getMessage(), e); } }