Java 类org.openqa.selenium.interactions.Keyboard 实例源码

项目:colibri-ui    文件:TextFieldSteps.java   
@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);
    }
}
项目:colibri-ui-template    文件:AndroidDynamicFieldSteps.java   
@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);
    }
}
项目:colibri-ui-template    文件:AndroidDynamicFieldSteps.java   
@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);
    }
}
项目:colibri-ui-template    文件:IOSDynamicFieldSteps.java   
@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);
    }
}
项目:xframium-java    文件:DeviceWebDriver.java   
@Override
public Keyboard getKeyboard()
{
    setLastAction();
    if ( webDriver instanceof HasInputDevices )
        return ((HasInputDevices) webDriver).getKeyboard();
    else
        return null;
}
项目:grid-refactor-remote-server    文件:SendKeyToActiveElement.java   
@Override
public Void call() throws Exception {
  Keyboard keyboard = ((HasInputDevices) getDriver()).getKeyboard();

  String[] keysToSend = keys.toArray(new String[0]);
  keyboard.sendKeys(keysToSend);

  return null;
}
项目:teasy    文件:WebDriverDecorator.java   
@Override
public Keyboard getKeyboard() {
    return ((HasInputDevices) driver).getKeyboard();
}
项目:easytest    文件:DeviceWebDriver.java   
@Override
public Keyboard getKeyboard() {
    return ((HasInputDevices) driver).getKeyboard();
}
项目:mario    文件:WebRobot.java   
private Keyboard keyboard() {
    return inputDevices().getKeyboard();
}
项目:easyium-java    文件:WebDriver.java   
/**
 * @return the {@link Keyboard} of current driver
 */
public Keyboard getKeyboard() {
    return ((HasInputDevices) seleniumWebDriver()).getKeyboard();
}
项目:jsflight    文件:WebDriverWrapper.java   
@Override
public Keyboard getKeyboard()
{
    return ((HasInputDevices)driver).getKeyboard();
}
项目:che    文件:SeleniumWebDriver.java   
@Override
public Keyboard getKeyboard() {
  return driver.getKeyboard();
}
项目:web-test-framework    文件:Driver.java   
/**
 *
 * @return
 */
@Override
public Keyboard getKeyboard() {
  return ((HasInputDevices) driver).getKeyboard();
}
项目:seleniumcapsules    文件:Browser.java   
@Override
default Keyboard getKeyboard() {
    HasInputDevices t = (HasInputDevices) get();
    return t.getKeyboard();
}
项目:minium    文件:StatefulWebDriver.java   
@Override
public Keyboard getKeyboard() {
    return ((HasInputDevices) webDriver).getKeyboard();
}
项目:minium    文件:BaseDocumentWebDriver.java   
@Override
public Keyboard getKeyboard() {
    return ((HasInputDevices) webDriver).getKeyboard();
}
项目:minium    文件:KeyboardInteraction.java   
protected Keyboard keyboard() {
    return getSource().as(InternalWebElements.class).documentDriver().getKeyboard();
}
项目:minium    文件:DelegatorWebDriver.java   
protected Keyboard delegateKeyboard() {
    return ((HasInputDevices) delegate).getKeyboard();
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public Keyboard getKeyboard() {
    return new DelegatorKeyboard();
}
项目:minium    文件:MockWebDriver.java   
@Override
public Keyboard getKeyboard() {
    return mockKeyboard;
}
项目:qaf    文件:QAFWebDriver.java   
Keyboard getKeyboard();