You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using dalek. I want use custom function after the creation of an screenshot. Example:
var fs = require('fs');
module.exports = {
'Amazon does its thing': function (test) {
test'open';
test.type('#text', "xddfg")
.screenshot(':date/homepage.png', function(data){console.log(data);})
.done();
}
};
How i can careate custom function? Now when i write code after done() this code performed at example:
var fs = require('fs');
module.exports = {
'Amazon does its thing': function (test) {
test['open']('http://ya.ru/');
test.type('#text', "xddfg")
.screenshot(':date/homepage.png')
.done();
There is no API for that yet, but you can use a little trick:
You can add the log.message method after the screenshot function:
varfs=require('fs');module.exports={'Amazon does its thing': function(test){test['open']('http://ya.ru/');test.type('#text',"xddfg").screenshot(':date/homepage.png').log.message(function(){// Node context, do some nifty fs stuff herereturn'done'}).done();
I'm using dalek. I want use custom function after the creation of an screenshot. Example:
var fs = require('fs');
module.exports = {
'Amazon does its thing': function (test) {
test'open';
test.type('#text', "xddfg")
.screenshot(':date/homepage.png', function(data){console.log(data);})
.done();
}
};
How i can careate custom function? Now when i write code after done() this code performed at example:
console.log(11111111111);
}
};
Running tests
Running Browser: PhantomJS
11111111111
OS: windows 7 32bit
Browser Version: 1.9.8
RUNNING TEST - "Amazon does its thing"
0/0 assertions passed. Elapsed Time: 3.4 sec
How i can create callback function?
Thanks!
The text was updated successfully, but these errors were encountered: