Package daveayan.gherkinsalad.components

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


  }
 
  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


    Element tab = find_tab_li(tab_to_remove);
    Element tab_close_icon = tab.findElement(By.className("ui-icon-close"));
    if(tab_close_icon.is_null()) {
      error("Tab '" + tab_to_remove +"' does not have the icon to close it. Cannot remove");
    } else {
      tab_close_icon.click();
      action("Tab '" + tab_to_remove + "' removed.");
    }
    takeScreenshot();
  }
 
View Full Code Here

  public void select_option_if_enabled(String option) {
    if(isEnabled()) {
      click_if_enabled();
      Element ul = find_ul_element();
      Element element_to_select = ul.findElement(By.partialLinkText(option));
      element_to_select.click();
    }
  }

  public void should_have_options(String... expected_strings) {
    Strings options = Strings.instance_from(get_all_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

    Element tab = find_tab_li(tab_to_remove);
    Element tab_close_icon = tab.findElement(By.className("ui-icon-close"));
    if(tab_close_icon.is_null()) {
      error("Tab '" + tab_to_remove +"' does not have the icon to close it. Cannot remove");
    } else {
      tab_close_icon.click();
      action("Tab '" + tab_to_remove + "' removed.");
    }
    takeScreenshot();
  }
 
View Full Code Here

  }

  public void click_if_enabled() {
    Element element = root_element();
    if(this.isEnabled()) {
      element.click();
    }
  }
  public void click_if_exists() {
    click_if_enabled();
  }
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();
    }
  }
 
  public void click_if_exists() {
    click_if_enabled();
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

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.