Package daveayan.gherkinsalad.components.core

Examples of daveayan.gherkinsalad.components.core.Element.click()


        String value = input.getAttribute("value");
        if(value == null) return Boolean.FALSE;
        return value.trim().equals(code);
      }
    });
    element_to_select.click();
  }

  public Strings get_all_options() {
    Elements root_elements = root_elements();
    return toStrings(root_elements);
View Full Code Here


        String value = input.getAttribute("value");
        if(value == null) return Boolean.FALSE;
        return value.trim().equals(code);
      }
    });
    element_to_select.click();
  }

  public void should_have_all_these(String... expected_options) {
    Strings option_strings = get_all_options();
    Strings strings_not_present = option_strings.has_all_these(expected_options);
View Full Code Here

  public void select_option_if_enabled(String option) {
    Element element = root_element();
    if (this.isEnabled()) {
      Elements options = element.findElements(By.tagName("option"));
      Element option_to_select = options.findFirstElementWithText(option);
      option_to_select.click();
    }
  }

  public void select_code_if_enabled(String code) {
    Element element = root_element();
View Full Code Here

  }

  public void click_if_enabled() {
    Element element = root_element();
    if(this.isEnabled()) {
      element.click();
    } else {
      action("Did not click '" + this + "' since it is not enabled");
    }
  }
 
View Full Code Here

  }
 
  public void click_if_exists() {
    Element element = root_element();
    if(this.isDisplayed()) {
      element.click();
    } else {
      action("Did not click '" + this + "' since it is not displayed");
    }
  }
 
View Full Code Here

  }
 
  public void click_if_exists_and_enabled() {
    Element element = root_element();
    if(this.isEnabled() && this.isDisplayed()) {
      element.click();
    } else {
      action("Did not click '" + this + "' since it is not enabled and not displayed");
    }
  }
View Full Code Here

  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_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 void click_if_enabled() {
    Element element = root_element();
    if(this.isEnabled()) {
      element.click();
    } else {
      action("Did not click '" + this + "' since it is not enabled");
    }
  }
 
View Full Code Here

  }
 
  public void click_if_exists() {
    Element element = root_element();
    if(this.isDisplayed()) {
      element.click();
    } else {
      action("Did not click '" + this + "' since it is not displayed");
    }
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.