1
我正在使用dalek。 我想在創建屏幕截圖後使用自定義函數。 例如:dalek回調函數或自定義函數
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', function(data){console.log(data);})
.done();
}
};
如何關心自定義函數? 現在,當我寫的例子進行()完成此代碼後,代碼:
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();
console.log(11111111111);
}
};
Running tests
Running Browser: PhantomJS
11111111111
OS: windows 7 32bit
Browser Version: 1.9.8
RUNNING TEST - "Amazon does its thing"
> OPEN http://ya.ru/
> TYPE #text
> SCREENSHOT 2015-03-25/homepage.png
* 0 Assertions run
* TEST - "Amazon does its thing" SUCCEEDED
0/0 assertions passed. Elapsed Time: 3.4 sec
如何我可以創建回調函數?
謝謝!