I tried using window-handles, Alerts and also i tried without switching the window. But none of the idea worked for me. Once i select the element a new browser sub-window opens up. Now the control is on the new sub-window which i cannot detect at all. Need help. Before the action which opens this sub-window i can print to console but not after that. Also i tried JavaScriptExecutor but it didn't work too.
I am putting the screen shot of the window how it looks like. You can see the sub window is new but it is opened inside the main window and the control is totally on it.