0
私はuseingナイトウォッチいくつかの自動テストを行いたい:nightwatch.jsでexecuteAsyncを使用するには?
module.exports = {
'Demo asynchronous' : function(client){
client.url(client.launchUrl);
client.executeAsync(function(data, done) {
someAsyncOperation(function() {
client.setValue('#PoiSearch', data);
client.click('#POISearchButton');
done(true);
});
}, ['hotle'], function(result) {
client.expect.element('#Map div[name*="mark"]').to.be.present;
});
}
}
は、私はちょうどよりも、入力する単語をしたい:
this.demoTest = function (browser) {
browser.executeAsync(function(data, done) {
someAsyncOperation(function() {
done(true);
});
}, [imagedata], function(result) {
// ...
});
};
しかし、私はexecuteAsyncを使用する方法がわからない、流れは私のコードですその結果、私はDOMに特別な要素があることを知りたいのですが、executeAsyncの使い方は分かりません。