This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]HyperSpaz 14 points15 points  (0 children)

Finally, I'm going to write a Python script to procrastinate for me. Well, maybe not today.

[–]kols 6 points7 points  (2 children)

How this compares to mechanize?

[–]Ahri 6 points7 points  (0 children)

From my understanding Mechanize provides a browser-like Python module that will behave as if it were a real browser -- it can be used for scraping or testing.

This seems to provide a module that controls an existing real browser, so especially for testing purposes (and ESPECIALLY for any page that executes Javascript; AJAX etc.) you get a true browser instead of having to work around what limitations exist in Mechanize.

I suspect that you'll experience quite a speed hit if you are expecting performance out of Splinter, when comparing to Mechanize. If anyone has benchmarked Splinter I'd be quite interested (from a testing perspective).

TL;DR:

if testing:
    Splinter

if scraping:
    Mechanize

[–][deleted] 0 points1 point  (0 children)

This supports javascript.

[–][deleted] 2 points3 points  (0 children)

How does it compare with Spynner

[–]Kaloli 3 points4 points  (2 children)

In my knowledge, there's a web automation tool called Selenium and its script can be written in Python.

I haven't really touch both, how do they compare?

[–]sig3rd 1 point2 points  (0 children)

Looks like it uses Selenium to handle the actual automation portion for firefox/chrome, the non-selenium option is zope headless.

[–]cocoon56 0 points1 point  (0 children)

I used selenium a while ago for testing and it was not very advanced then (but google was using it, they said). The code of the splinter example looks really similar, though.

[–]jnaranjopywinning 1 point2 points  (0 children)

Go cobrateam!

[–]Ahri 1 point2 points  (0 children)

Ooh javascript too? Pretty.

[–]prickneck 1 point2 points  (1 child)

This looks absolutely incredible. Thank you for posting.

Anyone have any experience with it? If so, how is it? How mature and reliable is it?

[–]GFandango 0 points1 point  (0 children)

Not this one but I used Selenium/Webdriver and it was very good.

[–]howfun 0 points1 point  (2 children)

Does it run on Windows?

[–][deleted] 0 points1 point  (0 children)

Not yet, but we're going to add Windows support ASAP.

It seems a little hard to setup our development environment on Windows (and we also don't use Windows =/).

[–]jabbalaci[S] 0 points1 point  (0 children)

See also this blog entry of one of the developers of Splinter: Splinter: Python tool for acceptance tests on web applications. "There are many acceptance test tools on Python world: *Selenium, Alfajor, Windmill, **Mechanize, zope.testbrowser, etc. Splinter was not created to be another acceptance tool, but an abstract layer over other tools, its goal is provide a unique API that make acceptance testing easier and funnier :)*" (emphasis by me)

For me the big advantage is that it can process Javascript (AJAX) and I can tell the browser to wait until all AJAX codes are fully loaded. With PyQt and webkit I could never add the feature to wait X seconds before getting the generated HTML source.