com.sdl.selenium.extjs3.form.DisplayField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Testy Show documentation
Show all versions of Testy Show documentation
Automated Acceptance Testing. Selenium and Selenium WebDriver test framework for web applications.
(optimized for dynamic html, ExtJS, Bootstrap, complex UI, simple web applications/sites)
The newest version!
package com.sdl.selenium.extjs3.form;
import com.sdl.selenium.web.WebLocator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DisplayField extends TextField {
private static final Logger LOGGER = LoggerFactory.getLogger(DisplayField.class);
public DisplayField() {
setClassName("DisplayField");
setBaseCls("x-form-display-field");
setTag("*");
}
public DisplayField(WebLocator container) {
this();
setContainer(container);
}
public DisplayField(WebLocator container, String label) {
this(container);
setLabel(label);
}
public DisplayField(String name, WebLocator container) {
this(container);
setName(name);
}
public boolean setValue(String value) {
// TODO find better way (maybe extending Field not text field directly)
LOGGER.warn("can't set Value in display field");
return false;
}
public String getValue() {
String value = "";
if(ready()){
value = getText();
} else {
LOGGER.warn("getValue : field is not ready for use: " + toString());
}
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy