slimerjs | A scriptable browser like PhantomJS , based on Firefox | Test Automation library
kandi X-RAY | slimerjs Summary
kandi X-RAY | slimerjs Summary
SlimerJS is a scriptable browser. It allows you to manipulate a web page with an external Javascript script: opening a webpage, clicking on links, modifying the content... It is useful to do functional tests, page automation, network monitoring, screen capture etc. It is a tool like PhantomJs, except that it runs Gecko instead of Webkit, and it is headless when using Firefox 56+. SlimerJS provides the same API of PhantomJS. The current version of SlimerJS is highly compatible with PhantomJS 2.1. See current release notes in docs/release-notes-*.rst, and read the compatibility table to know the implementation level.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of slimerjs
slimerjs Key Features
slimerjs Examples and Code Snippets
Community Discussions
Trending Discussions on slimerjs
QUESTION
I have a Meteor app and want to call a server method from the command line, so that I can write a bash script to perform scheduled operations.
Is there any way to either call a method directly, or submit a form which will then trigger server-side code?
I've tried using curl to call a method, but either it's not possible or I'm missing something basic. This doesn't work:
...ANSWER
Answered 2018-Jul-18 at 09:53You could make use of the node ddp package to call the Meteor method in an own js file that you created with a specific script. From there you can pipe all outs to wherever you want.
Let's assume the following Meteor method:
QUESTION
This is first time i cant open website using headless browser such: phantomjs, slimerjs or casperjs. I just want to open website. I just create very basic script to open the website and take screenshot. but 3 (three) of them give me blank picture.
i try using:
...ANSWER
Answered 2018-Apr-18 at 02:04I experienced this issue with phantomJS and the following service args resolved it:
QUESTION
My understanding is that SlimerJS support in CasperJS is currently experimental (CasperJS 1.1.0-beta1, SlimerJS 0.8). And there are differences between the SlimerJS and CasperJS APIs.
Before I found this out, I assumed that the ultimate goal of CasperJS was to be a single framework that could run the same script against either Gecko (with SlimerJS) or WebKit (with PhantomJS), and I wouldn't need to "learn" Slimer or Phantom.
It now looks like there is limited abstraction, in which case I might as well use each underlying frameworks directly. Is the point that some abstraction is better than none, and things are likely to improve?
I am not asking for an opinion on "which framework is better right now" or "is CasperJS good enough". I want to understand the (documented, possibly aspirational) goals of CasperJS.
...ANSWER
Answered 2018-Jan-11 at 14:03From https://github.com/casperjs/casperjs/issues/1905 :
The original goals of CasperJS is make it easier for navigation and testing. Although it is great to be able to harmonize across different browser, in practice it is really hard.
...
If something you want to be done can be done directly and easily using the browser automation engine [SlimerJS or PhantomJS], then that's great and it is better to do that. If there are complicated steps of code and you find that CasperJS's API simplifies some of the hard work for you, then you can consider using CasperJS.
QUESTION
I am using CasperJS along with PhantomXHR. When I run the code in webkit version I can able to mock the response but the same script is not working in Firefox using --engine= slimerjs. It launches the Firefox browser and shows the Page error as window.sinon is undefined. Any solution to get rid of this issue. Are PhantomXHR + sinon will support with slimerjs?
...ANSWER
Answered 2017-Aug-11 at 04:01After so much struggle i have found that gloabl variable assigned to window is causing the issue.Just use sinon instead of window.sinon in phantomxhr
QUESTION
I read the documents and look like you need to have slimerjs http://docs.casperjs.org/en/latest/events-filters.html in order to get responseData.body
from the page.resource.received
event.
My use case is to download the images when the page is loaded so I don't do another round trip of: get the resource JSON, download and save any image file, reload the file to check for image dimension and if too small (icons) -> eliminate.
I am wondering if there is a better way to do this. I could in fact go do evaluate
img
selector but some websites use background-url
css and that's tricky.
ANSWER
Answered 2017-Aug-07 at 22:39Evaluate can be tricky, but here is a possible approach : (PhantomJS Only)
With this example theres the possibility of
storing the
clipRects
of the images matching specific criteria for posteriorpage.render()
of those elements into screen shot files.storing the urls of the matching resources for posterior download requests
capturing the url inside 'src' attribute or the 'background-image' css property, with an attempt of also obtaining the width & height for criteria match-and-capture purposes.
QUESTION
I get the following message in the browser but the casperjs script runs fine in the terminal ont the server.
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS. See Gecko version compatibility. If version is correct, launch slimerjs with --debug=true to see Firefox error message
...ANSWER
Answered 2017-May-19 at 10:02The solution to the problem is to install xvfb on the server and then run script with : xvfb-run -a casperjs --engine=slimerjs mycasperjs_script.js The reason for this error is that you need to make slimerjs headless and Mozilla's gecko engine isn't.
QUESTION
I have a process in Slimerjs that I run through a child_process Nodejs and I need to pass it some arguments.
I know how to use cli args with Nodejs
...ANSWER
Answered 2017-Mar-27 at 10:14SlimerJS documentation is pretty vocal about using arguments: https://docs.slimerjs.org/current/api/system.html#args
QUESTION
I have a process done with Slimerjs just to make a screenshot of my app. Obviously, it needs to be launched from the server but it opens a browser when I run on my own pc.
How should I run it from a server in production?
Thanks
...ANSWER
Answered 2017-Mar-13 at 13:30thats could be helpful :
https://github.com/laurentj/slimerjs/issues/80
or this :
http://docs.slimerjs.org/current/installation.html#having-a-headless-slimerjs
QUESTION
I am looking how to get karma-slimerjs-launcher to run with a version of Firefox that supports ES6.
This karma launcher uses an older version of slimerjs, while the last version, SlimerJS 0.10.2, supports Firefox 38 to 50.
I see that now Firefox has to be installed separately and SlimerJS may need to be pointed to it.
How can that be done in Jenkins?
...ANSWER
Answered 2017-Mar-06 at 22:33Considering no answer was offered, I decided to change things a bit. Instead of using karma-slimerjs-launcher, I am now using karma-firefox-launcher.
SlimerJS 0.10.2 requires that you install Firefox yourself and point Slimer to the Firefox binary. Having that in mind, it just makes sense to use karma-firefox-launcher instead.
- First you will need to install Firefox. You can find the available versions here: https://ftp.mozilla.org/pub/firefox/releases/.
- If you are using Linux for Jenkins, go to Configure in your project and check "Start Xvfb before the build, and shut it down after." in Build Environment. Here is more about the plugin: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin
- Configure browsers in karma.conf.js to user Firefox. Check more configurations here: http://karma-runner.github.io/1.0/config/configuration-file.html
QUESTION
I have written a script in Nodejs that takes a screenshot of websites(using slimerJs
), this script takes around 10-20 seconds to complete, the problem here is the server is stalled until this script has is finished.
ANSWER
Answered 2017-Jan-02 at 16:28If I were doing the similar thing, I would try these steps.
1.An array(a queue) to store requested info, when any request come, store those info in the array, and send back a msg to users, telling them they are in the queue, or the server is busy if there are already too many requests.
2.Doing the screen shot job, async, but not all in the same time. You could start the job if you find the queue is empty when a new request comes, and start another recursively when you finish the last one.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install slimerjs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page