'Popup isn't clicked by selenium driver

I'm having a problem where the following pop-up only appears when I run python selenium in incognito mode, and I can't click it. When I use Chrome, though, that does not happen. I assumed it was because of the cookies. I attempted to add all the cookies to the selenium driver, but was unsuccessful. Any advice or assistance is greatly appreciated.

enter image description here



Solution 1:[1]

This pop-up is an Alert.
Since here you want to click on Cancel button you want to dismiss this alert.
With Selenium in Python it can be done as following:

driver.switch_to.alert.dismiss()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Prophet