title: How to get an active window title between two browser tabs/windows using Selenium Java
body: <p>I can switch between two tabs/windows but my requirement is to know or get active window between them.</p>
  
  <p>In my project, on a click of a webElement of a page a random pop(tab/window) gets opened and I would like to know whether that(new) window has focus or my original page.</p>
  
  <p>I tried to use JNA Api to get the active window and its title but my web page is<br>
  remotely located.</p>
  
  <p>Perfect solution is greatly appreciated.</p>
  
  <p>Thanks</p>