Selenium Chromedriver Hangs?

后端 未结 2 996
孤街浪徒
孤街浪徒 2021-02-06 01:52

I have a long running python app that will periodically (every 30-60 seconds) open a webpage with selenium and chrome driver, run some javascript and take a screenshot. Its runn

相关标签:
2条回答
  • 2021-02-06 02:08

    I ran into a similar issue and found the answer here and blogged about it here. Setting the environment variable DBUS_SESSION_BUS_ADDRESS=/dev/null worked for me without having to restart Xvfb all the time.

    0 讨论(0)
  • 2021-02-06 02:24

    I never found out the specific piece of code that was causing this problem, but creating a fresh instance of Xvfb with each driver load seems to have fixed it. Perhaps there is a memory leak somewhere in the interaction between selenium and Xvfb? Either way, marking this as closed.

    0 讨论(0)
提交回复
热议问题