Comments (8)
@shama, thanks for your interest in extending phantomas!
Please shed some light on "This way other modules could use this library as a dependency and extend it on npm.". I'm curious to know how can node.js based code use phantomas code (without running it via PhantomJS).
npm test
example is really nice use case :)
I'm looking forward to see your implementation.
from phantomas.
Awesome! Glad to hear. I'll get started on an implementation to propose.
Here is how we're using phantomjs locally with Grunt: https://github.com/gruntjs/grunt-lib-phantomjs Our qunit and jasmine task use that library to run tests. It dynamically creates a tmp script file and spawns a locally installed phantomjs to run it. We have it tested across osx, windows, linux on node v0.8 and v0.10 currently.
from phantomas.
Hey @shama I did some local phantomjs as well. Need any help working on this?
from phantomas.
Random idea, guys. What do you think about phantomas module for NodeJS that will expose an API for spawning phantomas process and getting results?
var phantomas = require('phantomas');
phantomas(url, options, function(err, data) {
// callback or promise pattern
});
from phantomas.
It would be a good idea.
from phantomas.
Hi,
phantomas doesn't work locally for me:
d:\Buildkit>phantomas --url http://localhost:8001/ --verbose
15:47:29.987 phantomas v1.10.0:
C:/Users/maryia_sinkevich/AppData/Roaming/npm/node_modules/phantomas/
15:47:29.988 Options: {"version":false,"V":false,"help":false,"h":false,"colors":false,
"disable-js":false,"no-externals":false,"progress":false,"silent":false,
"spy-eval":false,"verbose":true,"v":true,"scroll":false,"film-strip":false, "analyze-css":false,
"page-source":false,"reporter":"plain","R":"plain","format":"plain","timeout":15,
"url":"http://localhost:8001/","user-agent":"phantomas/1.10.0 (PhantomJS/1.9.8; win32 x64)"}
...
15:47:30.044 req: <http://localhost:8001/>
15:47:30.044 Event send emitted
15:47:30.045 Event pageOpen emitted
15:47:30.045 Timeout set to 15 sec
15:47:30.046 Page loading started
15:47:30.046 Event loadStarted emitted
15:47:30.092 Loading progress: 10%
15:47:30.092 Event progress emitted
15:47:34.073 Event onResourceReceived emitted
15:47:34.074 Blocked request by phantomjs: <http://localhost:8001/>
15:47:34.074 Event abort emitted
15:47:34.075 recv: "start" stage not registered for <http://localhost:8001/>!
15:47:34.075 contentLength missing: {"url":"http://localhost:8001/"}
15:47:34.076 recv: HTTP 200 <http://localhost:8001/> [undefined]
15:47:34.076 Event recv emitted
15:47:34.076 Event metric emitted
15:47:34.077 Event metric emitted
15:47:34.077 Time to first byte: set to NaN ms for #1 request to <http://localhost:8001/>
(HTTP 200)
15:47:34.077 Time to last byte: set to 4030 ms
15:47:34.077 Event responseEnd emitted
15:47:34.078 Block domains: assuming "localhost" to be the main domain
15:47:34.078 Event metric emitted
15:47:34.078 Performance timing: responseEnd = 1428421654078
15:47:34.078 Event milestone emitted
15:47:34.083 Page loading finished ("fail")
15:47:34.083 Event loadFailed emitted
15:47:34.083 Exiting with code #254 (Page loading failed)!
15:47:34.083 Event exit emitted phantomas: (254) Page loading failed
15:47:34.097 phantomas scope injected
Could you please help in resolving this issue.
Timeout increasing didn't help.
from phantomas.
What does curl -sv http://localhost:8001 > /dev/null
shows?
from phantomas.
Thank you for your response.
d:\Buildkit>curl -sv http://localhost:8001 > /dev/null
The system cannot find the path specified.
My mistake, didn't observe that server was stopped.
Now everything is working.
from phantomas.
Related Issues (20)
- jquery-3.3.1.min.js: 3 vulnerabilities (highest severity is: 6.1)
- async-3.2.0.tgz: 1 vulnerabilities (highest severity is: 7.8)
- jquery-1.4.4.js: 3 vulnerabilities (highest severity is: 6.1)
- jquery-1.4.4.min.js: 4 vulnerabilities (highest severity is: 6.1)
- Use mkcert for creating a proper SSL certificates for tests
- Run integration tests in parallel
- Test failed - request throttled by proxy. Is it possible to add custom header to a config? HOT 1
- Disable flaky tests that randomly fail
- Improve integration with GitHub Actions
- CSS::Sassv3.4.11: 3 vulnerabilities (highest severity is: 8.1) - autoclosed HOT 1
- CSS::Sassv3.4.11: 3 vulnerabilities (highest severity is: 8.1) - autoclosed HOT 1
- CSS::Sassv3.4.11: 3 vulnerabilities (highest severity is: 8.1) - autoclosed HOT 1
- Monitoring error pages HOT 6
- CSS::Sassv3.4.11: 3 vulnerabilities (highest severity is: 6.2) - autoclosed HOT 1
- CSS::Sassv3.4.11: 3 vulnerabilities (highest severity is: 6.2)
- Resume on error
- Run selected modules is not working
- Run a local instance of httpbin to prevent random timeouts causing the tests to fail
- mockery-2.1.0.tgz: 1 vulnerabilities (highest severity is: 9.8)
- Pass headless: "new" to puppeteer.launch() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phantomas.