I want to close the popup window that appears when I hit a particular url. Here is the "inspect element" window of that page:
Here is what I have tried:
driver.find_element_by_css_selector("i[@class='popupCloseIcon']").click()
But it gives following error:
InvalidSelectorException: Message: Given css selector expression "i[@class='popupCloseIcon']" is invalid: InvalidSelectorError: Document.querySelector: 'i[@class='popupCloseIcon']' is not a valid selector: "i[@class='popupCloseIcon']"
Here is the url where popup appears: https://www.investing.com/equities/oil---gas-dev-historical-data Once the url is opened through selenium, the pop up appears after a few seconds. How can I click that close button?