This method is used to switch to the tabbed/pop up windows. Need to pass the index or title of the window as parameters.
S.SwitchTo.Window(index);→Index 1 indicates the main window, index 2 indicates the first child window which is opened from the main window and etc...
S.SwitchTo.Window("title");→ Focus switches to the tabbed/popup window using the window title.
S.SwitchTo.MainWindow();→Focus switches to the main window.