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.isDisplayed() && 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 + "'");
}
}