Package daveayan.gherkinsalad.components

Examples of daveayan.gherkinsalad.components.Element


      action("Did not enter text '" + text + "' in disabled text field '" + this + "'");
    }
  }

  public void append_text_if_enabled(String text) {
    Element element = root_element();
    if(this.isEnabled()) {
      wait_between_steps();
      String current_text = element.getAttribute("value");
      element.clear();
      element.sendKeys(text + current_text);
      action("Appended text '" + text + "' in " + this);
    } else {
      action("Did not append text '" + text + "' in disabled text field '" + this + "'");
    }
  }
View Full Code Here


      action("Did not append text '" + text + "' in disabled text field '" + this + "'");
    }
  }

  public void click_if_enabled() {
    Element element = root_element();
    if(this.isEnabled()) {
      element.click();
      action("Clicked in textfield " + this);
    } else {
      action("Did not click disabled textfield " + this);
    }
  }
View Full Code Here

    super.name(name);
    return this;
  }
 
  public boolean isEnabled() {
    Element element = root_element();
    return element.isEnabled();
  }
View Full Code Here

    Element element = root_element();
    return element.isEnabled();
  }

  public void click_if_enabled() {
    Element element = root_element();
    if(this.isEnabled()) {
      element.click();
    }
  }
View Full Code Here

//    }
//    return false;
//  }

  public Element root_element() {
    Element element = findElement(element_locator);
    validate_position_and_css(element);
    return element;
  }
View Full Code Here

  /**
   * Default implementation. Returns the value from getText() method of WebElement
   */
  public String getText() {
    Element element = root_element();
    return element.getText();
  }
View Full Code Here

TOP

Related Classes of daveayan.gherkinsalad.components.Element

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.