Package daveayan.gherkinsalad.components

Examples of daveayan.gherkinsalad.components.Element


 
  public void click_if_exists_and_enabled() {
  }

  public void enter_text_if_enabled(String text) {
    Element element = root_element();
    if(this.isEnabled()) {
      wait_between_steps();
      element.clear();
      element.sendKeys(text);
      action("Entered text '" + text + "' in " + this);
    }
  }
View Full Code Here


      action("Entered text '" + text + "' in " + 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);
    }
  }
View Full Code Here

      action("Appended text '" + text + "' in " + this);
    }
  }
 
  public boolean isEnabled() {
    Element element = root_element();
    return element.isEnabled();
  }
View Full Code Here

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

    return element.isEnabled();
  }

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

  public void click_if_exists() {
    click_if_enabled();
  }
 
  public boolean isDisplayed() {
    Element element = root_element();
    return element.is_not_null();
  }
View Full Code Here

    return element.is_not_null();
  }
 
  public void click_if_exists_and_enabled() {
    wait_between_steps();
    Element element = root_element();
    if(! (element instanceof NullElement)) {
      if(this.isEnabled()) {
        element.click();
      } else {
        action("Did not click disabled " + this);
        takeScreenshot();
      }
    } else {
View Full Code Here

  public String getText() {
    if(isNotDisplayed()) {
      error("Element '" + this + "' is not displayed. Cannot getText on this element");
      return "NOT_DISPLAYED";
    }
    Element element = root_element();
    if(element.is_null()) {
      error("Element '" + this + "' is not displayed. Cannot getText on this element");
      return "IS_NULL";
    }
    return element.getAttribute("value");
  }
View Full Code Here

    }
    return element.getAttribute("value");
  }
 
  public boolean isEnabled() {
    Element element = root_element();
    return element.isEnabled();
  }
View Full Code Here

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

  public void enter_text_if_enabled(String text) {
    Element element = root_element();
    if(this.isEnabled()) {
      wait_between_steps();
      element.clear();
      element.sendKeys(text);
      action("Entered text '" + text + "' in " + this);
    } else {
      action("Did not enter text '" + text + "' in disabled text field '" + this + "'");
    }
  }
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.