0
發現摩卡和webdriverjs後,我想給它一個鏡頭,在閱讀readme.md
在https://github.com/camme/webdriverjs,所以我開始了一個微不足道的測試。webdriverjs:預期的字符串得到一個對象
var webdriverjs = require("webdriverjs"),
client = webdriverjs.remote(),
expect = require("chai").expect;
suite('Functional tests', function(done) {
setup(function(done) {
client.init().url('http://www.google.com', done);
});
test('test if you can open a firefox page', function() {
var inputType = client.getAttribute('#searchtext_home', 'type');
expect(inputType).to.be.a('string');
console.log(myString);
});
teardown(function(done) {
client.end(done);
//done();
});
});
獲取谷歌的輸入元素,並期望它的類型是文本。 我以inputType
變量結束了一個對象。
Asse田:預期{對象(的sessionId,desiredCapabilities,...)}是一個字符串