Is it possible to run Selenium scripts without having an X server running, too?

前端 未结 1 431
忘了有多久
忘了有多久 2021-01-02 07:51

I have a python script that uses selenium RC; specifically webdriver.

I would love to have the script run as a post-commit hook, ideally through IE, Safari (if possi

相关标签:
1条回答
  • 2021-01-02 08:10

    Yes, you need to have X server running because Selenium requires a running browser and browsers need some kind of X server in order to run.

    Fortunately there are many types of X servers and one of them is Xvfb aka X virtual framebuffer that does all the operations in memory and thus requires no screen.

    Wikipedia has also some nice examples.

    Also there are lots of questions here on SO for keywords headless, xvfb and selenium. Choose wisely ;)

    [Edit]: Here's a nice example.

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