Пример #1
0
 /**
  * Type a value into a field and then press Enter, making sure that the field is empty first.
  *
  * @param value
  */
 public WebElementFacade typeAndEnter(final String value) {
   waitUntilElementAvailable();
   clear();
   webElement.sendKeys(value, Keys.ENTER);
   notifyScreenChange();
   return this;
 }
Пример #2
0
 /**
  * Type a value into a field, making sure that the field is empty first.
  *
  * @param value
  */
 public WebElementFacade type(final String value) {
   enableHighlightingIfRequired();
   waitUntilElementAvailable();
   clear();
   webElement.sendKeys(value);
   notifyScreenChange();
   return this;
 }
Пример #3
0
  /**
   * Type a value into a field and then press TAB, making sure that the field is empty first. This
   * currently is not supported by all browsers, notably Firefox.
   *
   * @param value
   */
  public WebElementFacade typeAndTab(final String value) {
    enableHighlightingIfRequired();
    waitUntilElementAvailable();
    clear();

    webElement.sendKeys(value);
    webElement.sendKeys(Keys.TAB);

    getClock().pauseFor(100);
    notifyScreenChange();
    return this;
  }