I am trying to click a link:
driver.find_element_by_css_selector("a[href='javascript:openhistory('AXS0077')']").click()
This works well if the link opens in a new window, but in this case the link does open a popup. When I try to click a link using this method using selenium, it gives me an error:
Message: u "This selector a [href = 'javascript: openhistory (' AXS0077 ')'] is either invalid or does not use WebElement. The following error occurred: \ nInvalidSelectorError: Invalid or illegal selector was specified"
Is not it? because I think there can be several ways to deal with pop-ups.
Vipul source
share