Implemement PhantomJs Driver Factory
Would be nice to be able to use this together with PhantomJs.
You can use existing Selenium2DriverFactory for integrating with PhantomJS. To make it work you need to start PhantomJS like this:
phantomjs --webdriver=PORT
See http://phantomjs.org/release-1.8.html .
Since PHPUnit-Mink is using Mink for browser communication and Mink doesn't have direct PhantomJS (only via WebDriver protocol) we also can't directly support PhantomJS.
Hey @aik099 ,
Thanks for your reply. I found https://github.com/jcalderonzumba/MinkPhantomJSDriver which at least looks like a dedicated driver.
The problem with the selenium webdriver is, I need to read the response status code.
The phantomjs Driver does have all features, including getStatusCode()
Yes, I'm aware of that project and we've discussed it at Mink (see https://github.com/minkphp/Mink/issues/654). The problem with that is, that it contains 3 libraries in a one:
- the Poltergeist
- the Mink driver that talks with Poltergeist
- the MinkExtension factory that talks with a driver
and that fact prevents it from being properly integrated into Mink itself.
If you wish you can send PR with PhantomJSDriverFactory class, that would make use of that library.
Thanks for the pointers! I will check it and report back.
@aik099 this is not really true anymore. The repository has been split into multiple packages
It was? That's great, because original issue had no mention about this. Maybe we can then mention that driver on Mink page somewhere?
@mablae , please send PR, that would add new driver factory.
Closing this as PhantomJS is not maintained anymore.