Code Monkey home page Code Monkey logo

Comments (15)

fsouza avatar fsouza commented on July 17, 2024

Going to work on it using pyphantomjs: https://github.com/ariya/phantomjs/blob/master/python/pyphantomjs.py

from splinter.

rafaelcaricio avatar rafaelcaricio commented on July 17, 2024

Or PySide! :)

from splinter.

cacciaresi avatar cacciaresi commented on July 17, 2024

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.

from splinter.

fsouza avatar fsouza commented on July 17, 2024

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 :)

from splinter.

cacciaresi avatar cacciaresi commented on July 17, 2024

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.

from splinter.

fsouza avatar fsouza commented on July 17, 2024

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.

from splinter.

cacciaresi avatar cacciaresi commented on July 17, 2024

Excellent information! Thanks a lot.

We will be updating this issue while we progress on the issue.

from splinter.

fabiomcosta avatar fabiomcosta commented on July 17, 2024

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!

from splinter.

fsouza avatar fsouza commented on July 17, 2024

Glad to read this :)

from splinter.

fabiomcosta avatar fabiomcosta commented on July 17, 2024

BTW, the test suite you guys did is awesome! Will help a lot.

from splinter.

oinopion avatar oinopion commented on July 17, 2024

I would love to see phantom.js supported.

from splinter.

fabiomcosta avatar fabiomcosta commented on July 17, 2024

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.

from splinter.

fsouza avatar fsouza commented on July 17, 2024

There's spynner: http://code.google.com/p/spynner/

from splinter.

fabiomcosta avatar fabiomcosta commented on July 17, 2024

thats the one I was trying to remember :) ty @fsouza

from splinter.

fsouza avatar fsouza commented on July 17, 2024

The right link for spynner, on github: https://github.com/makinacorpus/spynner

from splinter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.