2
我想写一个检查元素是否具有一流的试验:AngularJS情景预期类和期货
element('#header-menu .menu-component-item a').query(function(els, done) {
var el = els.eq(4);
el.click();
sleep(.25);
expect(browser().location().path()).toBe(el.attr('href'));
expect(el.attr('class')).toContain('selected');
done();
});
的问题是,我不断收到错误TypeError: Cannot read property 'indexOf' of undefined
。我预计el.attr('class')
是未来,但我不知道为什么它不是。有没有其他的方法呢?