Which features should go into splinter?

57 views
Skip to first unread message

Lorin Hochstein

unread,
Dec 5, 2012, 10:59:42 PM12/5/12
to splinter-...@googlegroups.com
Since splinter wraps other automation tools, how do you generally decide which features to expose directly via the splinter API?

For example, I needed to do screenshots of web pages, and I discovered that the selenium driver has a get_screenshot_as_file method. Right now, I'm doing browser.driver.get_screenshot_as_file. I thought about adding it to the splinter API and submitting a pull request (and raise a NotImplementedError for zopetestbrowser), But I don't know what the criteria are for adding API calls to splinter, and I assume you don't want to just pass through every call supported by selenium.


Lorin

Hugo Lopes Tavares

unread,
Dec 6, 2012, 11:08:54 AM12/6/12
to splinter-...@googlegroups.com
Hello Lorin,

When I started writing splinter with Andrews Medina and Gustavo
Rezende, our idea was to have a "general API", independent of what
driver you choose. But I am not following every splinter step, and I
know some not so general methods are exposed.

I personally would not add this screenshot feature to splinter API,
but I am open to discussion!

See you,
Hugo.

Lorin Hochstein

unread,
Dec 6, 2012, 10:38:11 PM12/6/12
to splinter-...@googlegroups.com
Hi Hugo:

Thanks, that's helpful. I'm at a point in my project where I'm trying to decide whether to continue using splinter or switch to selenium for my testing. It sounds like for my use case it may make more sense to use selenium directly. Since I'm using the selenium driver exclusively right now with splinter, it probably makes more sense for me to just switch to selenium rather than make splinter do things it wasn't really intended for .

Take care,

Lorin

Andrews Medina

unread,
Dec 9, 2012, 8:33:02 PM12/9/12
to splinter-...@googlegroups.com
Hello Lorin,
sorry for my late response.

On Thu, Dec 6, 2012 at 1:59 AM, Lorin Hochstein
<lo...@nimbisservices.com> wrote:
> Since splinter wraps other automation tools, how do you generally decide
> which features to expose directly via the splinter API?
>

Generally we try to add features that allow it to interface tests are
easiest and fun.
Regarding get_screenshot_as_file still think it makes no sense to have
this method the browser.

> Thanks, that's helpful. I'm at a point in my project where I'm trying to decide whether to continue using splinter or switch to selenium for my testing. It sounds like for my use case it may make more sense to use selenium directly. Since I'm using the selenium driver exclusively right now with splinter, it probably makes more sense for me to just switch to selenium rather than make splinter do things it wasn't really intended for .

Soon it will be possible to add custom drivers to splinter, so you can
make the YourDriver that extends the WebDriver and add the
"get_screenshot_as_file" in it.

Thanks,

--
Andrews Medina
www.andrewsmedina.com

vplan Administrator

unread,
Dec 6, 2016, 9:52:02 AM12/6/16
to splinter-developers, lo...@nimbisservices.com
Checkout pytest-splinter which is a thin wrapper around splinter but will do what you want. Kinda :)
Reply all
Reply to author
Forward
0 new messages