if (currentObject == null) {
if (cachedPageTestObjectsMap.containsKey(objectName)) {
currentObject = cachedPageTestObjectsMap.get(objectName);
}
else {
currentObject = new LayoutObject();
currentObject.setName(objectName);
PageElement objectPageElement = pageValidation.findPageElement(objectName);
if (objectPageElement != null && objectPageElement.isVisible()) {
currentObject.setArea(objectPageElement.getArea());
}
currentSection.getObjects().add(currentObject);
cachedPageTestObjectsMap.put(objectName, currentObject);
}
}
else {
LayoutObject parentObject = currentObject;
currentObject = new LayoutObject(parentObject);
currentObject.setName(objectName);
PageElement objectPageElement = pageValidation.findPageElement(objectName);
if (objectPageElement != null && objectPageElement.isVisible()) {
currentObject.setArea(objectPageElement.getArea());