title: How to get focus to a new popup window which doesnt have name,id or unique title in selenium
body: <p>I want to get focus or select an window which pop-up's on click to the link and the link has following tags in html</p>
  
  <pre><code>&lt;a target="_restaurant_50" href="/impersonate/50"&gt;View Dashboard&lt;/a&gt;
  </code></pre>
  
  <p>if i put window name as _restaurant_50 it gives the following error in IDE</p>
  
  <pre><code>Window does not exist. If this looks like a Selenium bug, make sure to read http://seleniumhq.org/docs/04_selenese_commands.html#alerts-popups-and-multiple-windows for potential workarounds. 
  </code></pre>
  
  <p>How can i get the focus on this window please help...
  I tried all the ways specified on net such as get all windows*, select by title but it gives the parent title only, webdriver PHP switch window, etc.</p>
  
  <p>the number <code>50</code> is as per the number in database list.</p>
  
  <p>I am using selenium with PHP.</p>
  
  <p>Details:<br>
  Array Names before click<br>
  (<br>
      [0] => selenium_main_app_window<br>
  )<br>
  Array Ids before Click<br>
  (<br>
      [0] => undefined<br>
  )  </p>
  
  <p>Array Names After click<br>
  (<br>
      [0] => selenium_main_app_window<br>
  )<br>
  Array Ids After click<br>
  (<br>
      [0] => undefined<br>
  )E  </p>
  
  <p><strong>Update</strong>:<br>
  I tried opening the url using openWindow("url",Windowname) which gets open on click. It worked but it opens a new page doesnt follow the logged in session it asks again for logging in
  Thanks in Advance</p>