* The length of retrieved string must be greater than zero.
*/
protected void before() {
Object xat = tEnv.getObjRelation("XAccessibleText");
XAccessibleComponent component = null;
if (xat != null) {
oObj = (XAccessibleText) UnoRuntime.queryInterface(
XAccessibleText.class, xat);
component = (XAccessibleComponent) UnoRuntime.queryInterface(
XAccessibleComponent.class, xat);
}
text = (String) tEnv.getObjRelation("XAccessibleText.Text");
if (text == null) {
text = oObj.getText();
}
if (text.length() == 0) {
throw new StatusException(Status.failed(
"The length of text must be greater than zero"));
}
editOnly = (String) tEnv.getObjRelation("EditOnly");
LimitedBounds = tEnv.getObjRelation("LimitedBounds");
if (component == null) {
component = (XAccessibleComponent) UnoRuntime.queryInterface(
XAccessibleComponent.class,
tEnv.getTestObject());
}
bounds = component.getBounds();
log.println("Text is '" + text + "'");
System.out.println("############################");
}