added getWindowByEnum