title: Selenium open pop up window [Python]
body: <p>I am trying to click a link by:</p>
  
  <pre><code>driver.find_element_by_css_selector("a[href='javascript:openhistory('AXS0077')']").click()
  </code></pre>
  
  <p>This works nice if the link opens in a new window but in this case the link actually opens a pop up window. When I try clicking the link with this method, using selenium it gives me an error:     </p>
  
  <blockquote>
    <p>Message: u"The given selector
    a[href='javascript:openhistory('AXS0077')'] is either invalid or does
    not result in a WebElement. The following error
    occurred:\nInvalidSelectorError: An invalid or illegal selector was
    specified"</p>
  </blockquote>
  
  <p>Is this not the right way ? because
  I think there may be some different way to deal with pop windows.</p>