I am trying to click a link by:
driver.find_element_by_css_selector("a[href='javascript:openhistory('AXS0077')']").click()
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:
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"
Is this not the right way ? because I think there may be some different way to deal with pop windows.
driver.find_element_by_css_selector("""a[href='javascript:openhistory("AXS0077")']""").click()
ordriver.find_element_by_css_selector("""a[href="javascript:openhistory('AXS0077')"]""").click()