public String releaseKey(Keys theKey) { return keyboardActionObject + ".releaseKey(Keys." + theKey.name() + ")"; }
public String keyDown(Keys keys) { return builderActionObject + ".keyDown(Keys." + keys.name() + ")"; }
public String keyUp(Keys keys) { return builderActionObject + ".keyUp(Keys." + keys.name() + ")"; }
public String pressKey(Keys theKey) { return keyboardActionObject + ".pressKey(Keys." + theKey.name() + ")"; }
public String keyDown(String webElement, Keys keys) { return builderActionObject + ".keyDown(" + webElement + ", Keys." + keys.name() + ")"; }
public String keyUp(String webElement, Keys keys) { return builderActionObject + ".keyUp(" + webElement + ", Keys." + keys.name() + ")"; }
public void actionKeyDown(String locator, Keys keys) { LOG.keywordAppender() .appendLocator(locator) .appendArgument("Keys", keys.name()); Validate.notNull(actions, "actions is not yet started."); WebElement src = finder.find(locator); if (src == null) { throw new IllegalStateException(String.format("ERROR: Element %s not found", locator)); } actions.keyDown(src, keys); }
public void actionKeyUp(String locator, Keys keys) { LOG.keywordAppender() .appendLocator(locator) .appendArgument("Keys", keys.name()); Validate.notNull(actions, "actions is not yet started."); WebElement src = finder.find(locator); if (src == null) { throw new IllegalStateException(String.format("ERROR: Element %s not found", locator)); } actions.keyUp(src, keys); }
public void actionKeyDown(Keys keys) { LOG.keywordAppender().appendArgument("Keys", keys.name()); Validate.notNull(actions, "actions is not yet started."); actions.keyDown(keys); }
public void actionKeyUp(Keys keys) { LOG.keywordAppender().appendArgument("Keys", keys.name()); Validate.notNull(actions, "actions is not yet started."); actions.keyUp(keys); }
@Override public void keyDown(Keys theKey) throws WidgetException { try { Actions builder = new Actions(getGUIDriver().getWrappedDriver()); synchronized (InteractiveElement.class) { getGUIDriver().focus(); for (org.openqa.selenium.Keys key : org.openqa.selenium.Keys.values()) { if (key.name().equals(theKey.name())) { builder.keyDown(getWebElement(), key).build().perform(); break; } } } } catch (Exception e) { throw new WidgetException("Error while performing key down using " + theKey.name(), getByLocator(), e); } }
@Override public void keyUp(Keys theKey) throws WidgetException { try { Actions builder = new Actions(getGUIDriver().getWrappedDriver()); synchronized (InteractiveElement.class) { getGUIDriver().focus(); for (org.openqa.selenium.Keys key : org.openqa.selenium.Keys.values()) { if (key.name().equals(theKey.name())) { builder.keyUp(getWebElement(), key).build().perform(); break; } } } } catch (Exception e) { throw new WidgetException("Error while performing key up using " + theKey.name(), getByLocator(), e); } }
@Override public void keyUp(Keys theKey) throws WidgetException { try { Actions builder = new Actions(getGUIDriver().getWrappedDriver()); synchronized (InteractiveElement.class) { getGUIDriver().focus(); for (org.openqa.selenium.Keys key : org.openqa.selenium.Keys.values()) { if (key.name().equals(theKey.name())) { builder.keyUp(getWebElement(), key).build().perform(); break; } } } } catch (Exception e) { throw new WidgetException("Error while performing key up using " + theKey.name(), getByLocator(), e); } }
@Override public void keyDown(Keys theKey) throws WidgetException { try { Actions builder = new Actions(getGUIDriver().getWrappedDriver()); synchronized (InteractiveElement.class) { getGUIDriver().focus(); for (org.openqa.selenium.Keys key : org.openqa.selenium.Keys.values()) { if (key.name().equals(theKey.name())) { builder.keyDown(getWebElement(), key).build().perform(); break; } } } } catch (Exception e) { throw new WidgetException("Error while performing key down using " + theKey.name(), getByLocator(), e); } }
put("KEY_" + key.name(), key.toString());