if (isNumericFrameIdValid(nameOrIdOrIndex, startPage)) {
return getWindowByNumericFrameId(nameOrIdOrIndex, startPage);
}
// 3.) Fall back to old behaviour: nameOrIdOrIndex might be a concatenation
// of several '.' separated names, ids, or indexes ...
WebWindow window = startWindow;
// Walk over all parts of the frame identifier, each time looking for a frame
// with a name or ID matching this part of the identifier (separated by '.').
final String[] frames = nameOrIdOrIndex.split("\\.");
for (int i = 0; i < frames.length; ++i) {
final String currentFrameId = frames[i];
final HtmlPage page = (HtmlPage) window.getEnclosedPage();
if (isNumericFrameIdValid(currentFrameId, page)) {
window = getWindowByNumericFrameId(currentFrameId, page);
} else {
// Numeric frame ID is not valid - could be either because the identifier