new driver for webkit
we can create a driver using webkit engine to run actions without a browser, with the same results.
for help us with this, we can use qtwebkit
Going to work on it using pyphantomjs: https://github.com/ariya/phantomjs/blob/master/python/pyphantomjs.py
Or PySide! :)
Hello, are you currently working on this issue? Do you need some help to finish the issue? https://github.com/diegokogan and I may be able to help.
I'd appreciate your help a lot :)
Can you get QtWebKit working on a Mac OS?
I recently updated to Mac OS X Lion and Xcode 4 and didn't try again. I'm gonna try it later today :)
We look at this issue because we were looking for a headless browser to run our acceptance tests. We thought that using PhantomJS to implement a headless browser would be a good option.
Could you list which should be the behaviour to implement? We don't have much experience with the implementation of splinter.
Hi there, the process of create a new driver is pretty simple: you just need to implement a TestCase (extending tests.base. BaseBrowserTests). e.g.: you can create test_phantomjs.py file, containing something like this:
from splinter.browser import Browser
from tests.base import BaseBrowserTests
class PhantomJSTest(BaseBrowserTests):
@classmethod
def setUpClass(cls):
cls.browser = Browser('phantomjs')
# ...
And then you add your driver to splinter.driver.phantomjs.PhantomJS, e.g.:
from splinter.driver import DriverAPI, ElementAPI
class PhantomJS(DriverAPI):
pass
class PhantomJSElement(ElementAPI):
pass
All you have to do now is run the tests and implement the methods present on DriverAPI and ElementAPI classes. You can run the test with make:
$ make test which=tests/test_phantomjs.py
It's a very "guide" on how to write a splinter driver, please keep in touch if you have any trouble.
Excellent information! Thanks a lot.
We will be updating this issue while we progress on the issue.
I'm on it too, It's nice to see it actually working! Right now I can visit a page and get it's title. There's too much work to be done!
Glad to read this :)
BTW, the test suite you guys did is awesome! Will help a lot.
I would love to see phantom.js supported.
I've stopped it. I was having some non-helpful errors while trying to test it. The api would have to change too, cause phantomJs is all asynchronous, which made the work even more unpleasant. There's a python project that uses QtWebkit too, just don't remember the name, maybe it would be a good one to use as part of the qtwebkit driver.
There's spynner: http://code.google.com/p/spynner/
thats the one I was trying to remember :) ty @fsouza
The right link for spynner, on github: https://github.com/makinacorpus/spynner