Пример #1
0
 public WebElementFacade selectByVisibleText(final String label) {
   waitUntilElementAvailable();
   Select select = new Select(webElement);
   select.selectByVisibleText(label);
   notifyScreenChange();
   return this;
 }
Пример #2
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;
 }
Пример #3
0
 /** Wait for an element to be visible and enabled, and then click on it. */
 public WebElementFacade click() {
   enableHighlightingIfRequired();
   waitUntilElementAvailable();
   logClick();
   webElement.click();
   notifyScreenChange();
   return this;
 }
Пример #4
0
 public WebElementFacade selectByIndex(int indexValue) {
   enableHighlightingIfRequired();
   waitUntilElementAvailable();
   Select select = new Select(webElement);
   select.selectByIndex(indexValue);
   notifyScreenChange();
   return this;
 }
Пример #5
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;
 }
Пример #6
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;
  }