4

I am running a simple program written in python to launch a chrome incognito browser, navigate to a website, cast a vote (by clicking a radio button then clicking the vote button), then close the browser and repeat. I am running this code:

while 1>0:
    page = webdriver.Chrome(options=options)
    page.get(webpage)
    #some code here
    page.quit()

When i ran this code in PyCharm, it ran about ~50 times before it got EXTREMELY slow launching chrome. For instance, the first ~50 times it launched, it took 1-2 seconds to launch chrome and start loading the webpage. But after ~50 times it started taking 20+ seconds to even launch chrome. I had to completely restart pycharm to get this fixed and then it did it again after ~50 times.

I thought this was an issue with pycharm so i ran it directly from the terminal (I am on mac). It ran about ~300 times from the terminal before it started doing the same thing.

Any idea what is causing this or how i would fix it?

Thanks

Lzypenguin
  • 945
  • 1
  • 7
  • 18

0 Answers0