Is it possible to use Selenium WebDriver to drive PhantomJS?

后端 未结 2 883
眼角桃花
眼角桃花 2021-01-31 08:26

I’m going through the documentation for the Selenium WebDriver, and it can drive Chrome for example. I was thinking, wouldn\'t it be far more efficient to ‘drive’ PhantomJS?

相关标签:
2条回答
  • 2021-01-31 09:16

    PhantomJS now includes the GhostDriver project.

    You are also suggested to use PhantomJS directly or with a convenience library such as CasperJS. CasperJS is specifically designed to make it easy to do sequential operations to web pages, perfect for many automation tasks.

    Disclaimer: I am the author of PhantomJS.

    Edit: As noted in Nick's answer, GhostDriver is now included in PhantomJS.

    0 讨论(0)
  • 2021-01-31 09:21

    @Joseph, since the 1.8 release GhostDriver is included in the stable release of PhantomJS. Here is the exact release notes: http://phantomjs.org/release-1.8.html. You can simply start PhantomJS process to listen on some port, like this:

    phantomjs --webdriver=PORT
    

    Kudos to @detro and PhantomJS team for awesome work!

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