GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — NodeJS module NodeJS module
Chewie edited this page
Yellow Lab Tools is build around a core, which is a NodeJS module. The server uses the core, the CLI uses the core, and you can use if also if none of them fits your needs. Don't hesitate to contact us before coding something around YLT, your need could be the need of the many. So adding the functionality directly into YLT would probably be great.
npm install yellowlabtools --save The core returns a promise you can use this way: var ylt = require('../lib/index'); ylt(urlToTest) .then(function(data) { console.log('Success'); console.log(JSON.stringify(data, null, 2)); }) .fail(function(err) { console.log('Test failed for url: ' + url); console.error(err); }); You can launch the test with options: var yltOptions = { device: 'mobile', screenshot: '/my/path/screenshot.png' }; ylt(urlToTest, yltOptions) .then(function(data) { }); Use "phone" or "tablet" to simulate a mobile device (by user-agent and viewport size). Default is "desktop". The path where you want the screenshot to be saved (or false if you don't want a screenshot). Adds a cookie for a domain. Multiple cookies can be set, using a pipe separator. Example: Username and password for basic HTTP authentication. If your authentication is not basic (form based), you might be able to copy the session cookie from your browser, paste it in the "Cookie" setting and launch a run before your cookie expires. The See the page How do I debug Yellow Lab Tools? |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |