5 ms·
SlimerJS – A scriptable browser for Web developers
- iandanforth 12y agoI have an odd usecase. Would Slimer be able to handle capturing webgl output at video speeds? 30-60fps.
- eknkc 12y agoUsed it for a while instead of PhantomJS to automatically create screenshots of webpages. Produces better results (much better custom font support) but slower. I believe it's because Slimer is not really headless, you need xvfb, a virtual X11 server.
- mootothemax 12y agoProduces better results (much better custom font support)... Hah, funnily enough, that's the exact same reason we're using it as well! PhantomJS's "it'll be ready when it's ready" release cycle has been a bit frustrating, especially with version 2 and its support for custom fonts. It's a shame there's no one perfect solution: PhantomJS is great, shortcomings aside; and SlimerJS is near perfect but slow, slow, slow.
- baudehlo 12y agoPhantomJS (at least the 1.x branch) still randomly crashes a lot too.
- hackerboos 12y agoI've tried it for a screenshot service I was working on. I ended up using Selenium with Firefox because no other system supported Flash.
- tmaly 12y agoI had a project at work where I needed to navigate to a form on a regulatory sight and click a button to download a csv report. I initially tried PhantonJS, but it could not handle how the IIS server responded with the csv file. SlimmerJS was able to handle the response and capture the csv file for me. My only issue was it is a bit difficult to build from source on a RHE machine.
- mootothemax 12y agoOne quick tip if you're torn between SlimerJS and PhantomJS. Use http://casperjs.org http://casperjs.org scripts, and then choose the best engine at runtime. For example, need screenshots? Tell CasperJS to use SlimerJS. Looking for faster rendering to HTML? Tell CasperJS to use PhantomJS.
- deleted 12y ago[deleted]
- jaredmcdonald 12y agoQuick nit: you can take screenshots with PhantomJS [0], exposed in casperjs as `capture` [1] [0] http://phantomjs.org/screen-capture.html http://phantomjs.org/screen-capture.html [1] http://docs.casperjs.org/en/latest/modules/casper.html#capture http://docs.casperjs.org/en/latest/modules/casper.html#captu...
- mootothemax 12y agoQuick nit: you can take screenshots with PhantomJS Sorry, that's my fault for not going into more detail :) The big issue I have with PhantomJ's screenshots is that it doesn't support web fonts, and so pages don't render correctly.
- backwardm 12y agoJust FYI, I found a script (typekit.js) that allowed me to get PhantomJS to render TypeKit fonts nicely: https://github.com/bramstein/phantomjs-typekit https://github.com/bramstein/phantomjs-typekit
- tdumitrescu 12y agoLooks like web fonts work out of the box in phantomjs 2.0 (not released yet, but nightly source and binaries available): https://github.com/ariya/phantomjs/issues/10592 https://github.com/ariya/phantomjs/issues/10592
- cburgmer 12y ago
- StevePerkins 12y agoWhat are the advantages of a solution like this, over: [1] Selenium (http://www.seleniumhq.org http://www.seleniumhq.org), [2] scriptable testing, like Groovy's Geb (http://www.gebish.org http://www.gebish.org), which uses Selinium's core WebDriver component under the covers, or [3] scriptable headless browsing without using a real browser engine, such as with Python's Mechanize (http://wwwsearch.sourceforge.net/mechanize http://wwwsearch.sourceforge.net/mechanize)? Is this pretty much bullet #3, just for people who want to use "full-stack JavaScript" everywhere?
- methyl 12y agoThis type of solution is faster than Selenium, at least when talking about PhantomJS, as well as it's headless so it does not require running graphical environment. Bullet #2 is basically the same as #1, and advantage over #3 is that Mechanize won't run Javascript, so it's useless eg. for testing Single Page Applications.
- StevePerkins 12y agoHmm... can you elaborate further on that last point? I totally understand the value of headless browser testing, when you're not checking for browser-specific issues. However, I'm less clear on how a headless test runner's implementation language should ever matter one way or the other. If you're testing the behavior of a web application as it receives HTTP requests, then shouldn't the application be agnostic about which clients are sending those requests? If your test runner is reaching around the HTTP protocol and directly manipulating JavaScript on the rendered page, then doesn't that affect the reliability of the test suite... since it no longer represents true HTTP client interaction?
- orkj 12y agoI think what he was saying was: If I have a webpage that only does one thing, it executes alert('Hello world'); Then the headless solution would have to be able to check that the alert fired. If your testing framework does not execute the JavaScript on the page (i.e just fetching the resources) then you are back to square one. I have no idea if Mechanize executes page JavaScript, but SlimerJS (and PhantomJS) does. Which is the difference here. * execute alert will probably for most use cases be bootstrapping some MVC and setting properties, doing navigation and so on.
- moe 12y agoSlimer, Casper, Phantom... Browser testing is becoming a case for the Ghostbusters!
- saurabh 12y agoI use this to login to my ISP without opening a browser.
- neue 12y agoAnyone have pictures of this? I don't see any on the site.
- cburgmer 12y agoPhantomJS, SlimerJS or Selenium? Selenium if you want to support all browsers, including mobile. PhantomJS if you want a performant and easy solution. SlimerJS if you want PhantomJS but want HTML5/CSS3, too (or just need Firefox). My 2 cents
- z3t4 12y agoIn the past, when I used to cheat at various web games by running scripts, this would've been a wet dream.