@When("очистить \"$fieldName\"") public void clearField(@Named("$fieldName") String fieldName) { WebElement webElement = getWebElementByName(fieldName); webElement.clear(); Keyboard keyboard = driver.getKeyboard(); for (int i = webElement.getText().length(); i > 0; i--) { keyboard.sendKeys(Keys.BACK_SPACE); } }
@Step @When("ввод текста с клавиатуры \"$textOrKeyword\" посимвольно") public void sendTextDelay(@Named("$textOrKeyword") String textOrKeyword) { String text = propertyUtils.injectProperties(textOrKeyword); String eachLetter; Keyboard keyboard = driver.getKeyboard(); for (int i = text.length(); i > 0; i--) { eachLetter = String.valueOf(text.charAt(i - 1)); keyboard.sendKeys(eachLetter); } }
@Step @When("очистить \"$fieldName\"") public void clearField(@Named("$fieldName") String fieldName) { IElement element = getCurrentPage().getElementByName(fieldName); WebElement webElement = finder.findWebElement(element); Keyboard keyboard = driver.getKeyboard(); for (int i = webElement.getText().length(); i > 0; i--) { keyboard.sendKeys(Keys.BACK_SPACE); } }
@Step @When("очистить \"$field\"") public void clearField(@Named("$field") String field) { IElement element = getCurrentPage().getElementByName(field); WebElement webElement = finder.findWebElement(element); Keyboard keyboard = driver.getKeyboard(); for (int i = 0; i < webElement.getText().length(); i++) { keyboard.sendKeys(Keys.BACK_SPACE); } }
@Override public Keyboard getKeyboard() { setLastAction(); if ( webDriver instanceof HasInputDevices ) return ((HasInputDevices) webDriver).getKeyboard(); else return null; }
@Override public Void call() throws Exception { Keyboard keyboard = ((HasInputDevices) getDriver()).getKeyboard(); String[] keysToSend = keys.toArray(new String[0]); keyboard.sendKeys(keysToSend); return null; }
@Override public Keyboard getKeyboard() { return ((HasInputDevices) driver).getKeyboard(); }
private Keyboard keyboard() { return inputDevices().getKeyboard(); }
/** * @return the {@link Keyboard} of current driver */ public Keyboard getKeyboard() { return ((HasInputDevices) seleniumWebDriver()).getKeyboard(); }
@Override public Keyboard getKeyboard() { return ((HasInputDevices)driver).getKeyboard(); }
@Override public Keyboard getKeyboard() { return driver.getKeyboard(); }
/** * * @return */ @Override public Keyboard getKeyboard() { return ((HasInputDevices) driver).getKeyboard(); }
@Override default Keyboard getKeyboard() { HasInputDevices t = (HasInputDevices) get(); return t.getKeyboard(); }
@Override public Keyboard getKeyboard() { return ((HasInputDevices) webDriver).getKeyboard(); }
protected Keyboard keyboard() { return getSource().as(InternalWebElements.class).documentDriver().getKeyboard(); }
protected Keyboard delegateKeyboard() { return ((HasInputDevices) delegate).getKeyboard(); }
@Override public Keyboard getKeyboard() { return new DelegatorKeyboard(); }
@Override public Keyboard getKeyboard() { return mockKeyboard; }
Keyboard getKeyboard();