It does return an object from client.getAttribute()
. So you should use it's 3rd parameter which is a callback function like this:
test('test if you can open a firefox page', function(done) {
client.getAttribute('#searchtext_home', 'type', function(err, inputType) {
expect(inputType).to.be.a('string');
done();
});
});
See more detail example code here.