Unable to switch to window with index: '1'

@Ramazan I found this on this forum on another question. How about you try it?

int currentTab = WebUI.getWindowIndex()

WebUI.switchToWindowIndex(currentTab + 1)