Skip to content
Advertisement

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:

JavaScript

If you want directly go to web page, https://buy.libertymutual.com/auto?city=Somersworth&jurisdiction=NH&lob=Auto&policyType=Auto&zipCode=03878

Advertisement

Answer

Replace last 3 lines of your code by below lines.Used action chain to click.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement