How to click button in pop up window using python-selenium

I’m working to automate web page where i’m unable to close the pop up. I have tried to refresh/switch to pop up window, nothing worked. Code: If you want directly go to web page, https://buy.libertymutual.com/auto?city=Somersworth&jurisdiction=NH&lob=Auto&policyType=Auto&zipCode=03878 Answer Replace last 3 lines of your code by below lines.Used action chain to click.